![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Posts: 2
|
I've created a simple command button to goto a range of cells. The button works but I always get Run-time error 1004 Reference is not valid after it works.
Please advise a beginner. Thanks |
|
|
|
|
|
#2 |
|
Board Regular
Join Date: Mar 2002
Location: =ActiveCell.Address
Posts: 478
|
Not sure why it gives you the error. Is there any other info you can give? How are you defining the reference?
I just threw a command button on a worksheet and added the following and I get no errors. (Note R1C1 notation of reference) Private Sub CommandButton1_Click() Application.Goto Reference:="R30C2:R30C6" End Sub Any help?? Rgds AJ |
|
|
|
|
|
#3 |
|
Board Regular
Join Date: Mar 2002
Location: =ActiveCell.Address
Posts: 478
|
Or, alternatively...
Application.Goto Reference:=Range("A4:N304") You've gotta use the word "Reference", or else you'll get the runtime error Rgds AJ |
|
|
|
|
|
#4 |
|
New Member
Join Date: Mar 2002
Posts: 2
|
ok, thanks ill give that a try
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|