Can someone help me understand why this works:
Sub CommandButton1_Click()
Sheets("Inventory Data").Range("A1:G1").Copy
Sheets("Desig From Inv").Range("A1").PasteSpecial xlPasteValues
End Sub
But, this does not?
Sub CommandButton1_Click()
Sheets("Inventory Data").Range(Cells(1, 1), Cells(1, 7)).Copy
Sheets("Desig From Inv").Range("A1").PasteSpecial xlPasteValues
End Sub
I really want the column number to be a variable in the end. Like this:
Sub CommandButton1_Click()
Sheets("Inventory Data").Range(Cells(1, 1), Cells(1, i)).Copy
Sheets("Desig From Inv").Range("A1").PasteSpecial xlPasteValues
End Sub
I have tried many forms of getting "Cells" into the "Range".
Thanks!