Hi.
I have opened a new excel workbook, and inserted an ActiveX command button. The command button is programmed in VB with the following code:
Private Sub CommandButton1_Click()
Dim i
i = 2
Sheets("Sheet3").Activate
ActiveSheet.Range(Cells(i, 1), Cells(i, 4)).Select
End Sub
This produces the error "Run-time error '1004': Application-defined or object-defined error". I need help on how to select a range of cells, on a different worksheet, while using a variable as part of the cell adress. Thanks very much in advance!
Bookmarks