Hi,
I'm new to VBA and I have a problem with a macro I created. I am trying to loop through all the worksheets in the workbook paste some formulas, do a calculation, take that calculation and place it in a worksheet at the end of the workbook and place the value into the first empty cell in column "A" of the worksheet. The problem is when I run the code I get an error on the destination line:
What am I doing wrong?![]()
Range("IO5").Copy Destination:=Worksheets("Sheet4").Range("A" & Rows.Count).End(xlDown).Offset(1).Select
Here is the complete code:
Thanks![]()
Sub INSERT() ' ' INSERT Macro ' Dim ws As Worksheet For Each ws In ActiveWorkbook.Worksheets Windows("workbook1.xlsm").Activate Range("H1:IW1675").Select Selection.Copy Windows("workbook2.xlsm").Activate Range("H1").Select Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _ SkipBlanks:=False, Transpose:=False Range("IO5").Copy Destination:=Worksheets("Sheet4").Range("A" & Rows.Count).End(xlDown).Offset(1).Select ws.Delete Next ws End Sub











LinkBack URL
About LinkBacks
Register To Reply


Bookmarks