View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Command Buttons & ActiveX Controls

If you wrote that Sheet2 was renamed, then you'd have to change this line:

application.goto Worksheets("Sheet2").range("X99"), scroll:=true
to
application.goto Worksheets("IncidentDesription").range("X99"), scroll:=true

But I don't know why you're having trouble when you change the name of
Sheet1--sheet1 is the name of the sheet that contains the commandbutton, right?

(And remember to change x99 to the address of the cell that you want to go to.)

aussiegirlone wrote:

Dave Peterson/Bob Phillips

My apologies for not responding sooner as I was not home last night. The
Code you provided below works well Thankyou very much.
However, I would like to rename my worksheet (sheet1) to
(IncidentDesription) but doing so, stops the Code below from working. so how
can I rename the sheet to have it work with my commandbutton

Public Sub MyButton_Click()
application.goto Worksheets("Sheet2").range("X99"), scroll:=true 'or
false??
End Sub


--

Dave Peterson