This line of code
ActiveSheet.Range(“A” & i, “C” & i, “D” & i, “F” & i, “Q” & i, “R” & i).Select
in the following block generates an error. Any ideas why would be helpful.
Thanks,
Here is the code in question:
for i = 2 to RealLastRow ‘(a number indicating the last row of data)
‘back to the next cell to evaluate
Range(“L” & i ).Select
If strDisp “9999” Then
‘THIS FOLLOWING LINE OF CODE GENERATES AN ERROR…
ActiveSheet.Range(“A” & i, “C” & i, “D” & i, “F” & i, “Q” & i, “R” & i).Select
‘THE ERROR FROM THE ABOVE LINE OF CODE IS: “Wrong number of arguments or invalid property assignment”
Selection.Copy
‘paste the selected cells into the latest inventory worksheet…
Sheets(“Latest Inventory”).Select
‘find the last row in the latest inventory sheet
Call GetRealLastCell (THIS IS A SUB PROCEDURE THAT POPULATES GLOBAL VARIABLES WITH THE LAST ROW OF DATA AND LAST COLUMN OF DATA)
Range(“A” & RealLastRow).Select
ActiveSheet.Paste
Sheets(“Original Dataset”).Select
Application.CutCopyMode = False
End If
Next i