View Single Post
  #5   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 renamed the worksheet and the code worked, then you probably either had a
typo on the tab of the worksheet or a typo in the code.

To most programmers, typos aren't important--as long as they match every place
they're used <vbg!

aussiegirlone wrote:

Dave it worked Renaming the work sheet and the goto fixed the problem
thankyou very much.

"Dave Peterson" wrote:

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


--

Dave Peterson