Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i have programmatically deleted 'CommandButton2' from my sheet using
ActiveSheet.Shapes("CommandButton2").delete now when i open my workbook i get the following: Can't exit design mode because Control 'CommandButton2' can not be created i can't find any references to command button 2 in my code (on this sheet) - what do i do? I do have other commandbutton2's on other sheets. if i try to rename one of my controls to CommandButton2 i get a Ambiguous name detected: CommandButton2 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Without seeing the code, it sounds like in your opening event you are trying
to create a command button for something and trying to name it CommandButton2. Since you already have a CommandButton2 (even if it is on another sheet) Excel wants to name the new button the next workbook-wide number in sequence, say CommandButton14 This is just a guess from my past experience watching how excel names the new buttons in a workbook. "Gixxer_J_97" wrote: i have programmatically deleted 'CommandButton2' from my sheet using ActiveSheet.Shapes("CommandButton2").delete now when i open my workbook i get the following: Can't exit design mode because Control 'CommandButton2' can not be created i can't find any references to command button 2 in my code (on this sheet) - what do i do? I do have other commandbutton2's on other sheets. if i try to rename one of my controls to CommandButton2 i get a Ambiguous name detected: CommandButton2 |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i still wasn't able to figure out what the problem was. i didn't have an
open event and i'm not creating any controls - this problem started when i saved a copy of the workbook, deleted all the vba out of the new workbook, and then deleted the controls. as i was debugging i selected the wrong workbook (thus changing active workbook) and it deleted the controls out of my 'master' book. i ended up going to a previous backup and copied over the code changes and all seems to be ok. J "gocush" wrote: Without seeing the code, it sounds like in your opening event you are trying to create a command button for something and trying to name it CommandButton2. Since you already have a CommandButton2 (even if it is on another sheet) Excel wants to name the new button the next workbook-wide number in sequence, say CommandButton14 This is just a guess from my past experience watching how excel names the new buttons in a workbook. "Gixxer_J_97" wrote: i have programmatically deleted 'CommandButton2' from my sheet using ActiveSheet.Shapes("CommandButton2").delete now when i open my workbook i get the following: Can't exit design mode because Control 'CommandButton2' can not be created i can't find any references to command button 2 in my code (on this sheet) - what do i do? I do have other commandbutton2's on other sheets. if i try to rename one of my controls to CommandButton2 i get a Ambiguous name detected: CommandButton2 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Problem with TAB key and Textbox controls | Excel Programming | |||
Problem with looping through userform controls | Excel Programming | |||
problem in removing add-in | Excel Programming | |||
Removing Controls at RunTime? | Excel Programming | |||
A wacky problem - controls move on the screen after printing | Excel Programming |