Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveX CommandButton gets renamed when Sheet is cloned running Excel97
To All,
I developed a small routine in Excel2000 that has ActiveX Command Button's on the worksheet. The name of one button is NAVIGATIONButton (in the Properties view). The code I wrote uses this name without a problem when running the .xls in excel2000. A seperate module (of code) 'clones' the sheet at the Users request and ALL ActiveX buttons which reside on the new sheet work fine with the code when run in excel 2000. PROBLEM: When I run the .xls in Excel97 ... when the User clones the Master sheet ... The ActiveX buttons resort back to the names CommandButton1, CommandButton2 ... etc.???? I tried inserting code similar to the following: ActiveSheet.Shapes("CommandButton2").name = "NAVIGATIONButton" but to no avail ... The name change is not taking place. When the code stops, I can manually go into the properties view and change the name of the command button and then the code works fine. ANY HELP WOULD BE APPRECIATED! Thanks in advance, JimP |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
ActiveX CommandButton gets renamed when Sheet is cloned running Excel97
Jim,
You could try activesheet.oleobjects("CommandButton2").name ="NAVIGATIONButton" -- HTH RP (remove nothere from the email address if mailing direct) "JimP" wrote in message ups.com... To All, I developed a small routine in Excel2000 that has ActiveX Command Button's on the worksheet. The name of one button is NAVIGATIONButton (in the Properties view). The code I wrote uses this name without a problem when running the .xls in excel2000. A seperate module (of code) 'clones' the sheet at the Users request and ALL ActiveX buttons which reside on the new sheet work fine with the code when run in excel 2000. PROBLEM: When I run the .xls in Excel97 ... when the User clones the Master sheet ... The ActiveX buttons resort back to the names CommandButton1, CommandButton2 ... etc.???? I tried inserting code similar to the following: ActiveSheet.Shapes("CommandButton2").name = "NAVIGATIONButton" but to no avail ... The name change is not taking place. When the code stops, I can manually go into the properties view and change the name of the command button and then the code works fine. ANY HELP WOULD BE APPRECIATED! Thanks in advance, JimP |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Why doesn't formula work if sheet is renamed? | Excel Discussion (Misc queries) | |||
Renamed invalid sheet name | Excel Discussion (Misc queries) | |||
UserForm problem when Worksheet is cloned | Excel Programming | |||
Do not want sheet renamed | Excel Programming | |||
Running a CommandButton in Excel I get this error | Excel Programming |