Hi there
I have 2 workbooks opened at the same time. Lets call them workbook1 and worbook2.
I have workbook1 opened and I recorded a macro. In workbook1 I copy the range A2:H158 into workbook2
Here is a partial recorded code
Range("A2:H158").Select
Selection.Copy
Windows("workbook2.xlsx").Activate
Sheets("Sheet1").Select
Range("A2").Select
ActiveSheet.Paste
Here is what happened. Workbook2 did not open up when I ran the macro even though it opened up when I recorded the macro. Is there a different code I can use instead of Windows("workbook2.xlsx").Activate?
Thanks in advance.
I have 2 workbooks opened at the same time. Lets call them workbook1 and worbook2.
I have workbook1 opened and I recorded a macro. In workbook1 I copy the range A2:H158 into workbook2
Here is a partial recorded code
Range("A2:H158").Select
Selection.Copy
Windows("workbook2.xlsx").Activate
Sheets("Sheet1").Select
Range("A2").Select
ActiveSheet.Paste
Here is what happened. Workbook2 did not open up when I ran the macro even though it opened up when I recorded the macro. Is there a different code I can use instead of Windows("workbook2.xlsx").Activate?
Thanks in advance.