guyz tabangi ko aning macro beh, unsaon pgcopy sa cell sa pikas nga excel file to another excel file using macro, not using link...TIA
guyz tabangi ko aning macro beh, unsaon pgcopy sa cell sa pikas nga excel file to another excel file using macro, not using link...TIA
You mean copy content from from one excel file to another?
Sub CopyToOtherWB()
Dim TargetWb As Workbook
Dim TargetSh As Worksheet
Dim CopyFrom As Range
Dim DestCell As String
Dim InputSh As Worksheet
Set TargetWb = Workbooks("Book2.xls") ' Change to suit
Set TargetSh = TargetWb.Worksheets("Sheet1")
Set InputSh = ThisWorkbook.Sheets("Sheet1") ' Change to suit
Set CopyFrom = InputSh.Range("A2:F2")
DestCell = InputSh.Range("A1").Value
CopyFrom.Copy Destination:=TargetSh.Range(DestCell)
End Sub
Similar Threads |
|