Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default Command Buttons & ActiveX Controls

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

  #2   Report Post  
Posted to microsoft.public.excel.misc
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
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default Command Buttons & ActiveX Controls

I had done that but I get a meesage (run-time error 9 Subscript out of range)

"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

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 94
Default Command Buttons & ActiveX Controls

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

  #5   Report Post  
Posted to microsoft.public.excel.misc
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
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Buttons & ActiveX Controls aussiegirlone Excel Discussion (Misc queries) 2 December 16th 08 01:26 PM
Tab between ActiveX controls Tekhnikos Excel Discussion (Misc queries) 0 August 12th 08 03:42 PM
ActiveX controls Luke Excel Discussion (Misc queries) 1 October 26th 06 02:00 PM
ActiveX Controls Charly Excel Discussion (Misc queries) 1 October 18th 06 01:53 PM
ActiveX Controls vs Form Controls Alex Excel Discussion (Misc queries) 1 January 11th 06 08:46 AM


All times are GMT +1. The time now is 01:43 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"