MACRO in Excel
I am trying to code a command button to go something like this:
Private Sub Commandbox1_Click()
IF(Combox1.Value = 1 on this worksheet) Then
Sheets.("anothersheet").Select
Range.("A1").Select
Elseif (Combox1.Value = 2 on this worksheet) Then
Sheets.("anothersheet").Select
Range.("A2").Select
Else
End if
End Sub
Essentially, that is all I am doing, however, it keeps giving me the error message
Runtime error '1004'
Select method of Range class failed.
When debugging, it highlights the Range Class
THANKS for any help on this!
Bookmarks