![]() |
'Application.Goto Reference
Private Sub CommandButton1_Click()
On Error Resume Next set rng = Worksheets("Sheet1").Range(Textbox1.Text) On error goto 0 if rng is nothing then ' go to range A3 set rng = Worksheets("Sheet1").Range("A3") ' or go to the address contained in A3 of the current sheet ' set rng = Worksheets("Sheet1").Range(Range("A3").Value) End if Application.Goto Reference:=rng End Sub -- Regards, Tom Ogilvy "Jim Oswell" wrote in message ... I am having trouble with Private Sub CommandButton1_Click() Application.Goto Reference:=Worksheets("Sheet1").Range = Textbox1.text or $a$3.value End Sub where textbox1 or $A$3 is the intended goto cell name Any ideas |
All times are GMT +1. The time now is 11:17 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com