Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
for each obj in Activesheet.OleObjects
if typeof obj.Object is MSForms.Commandbutton msgbox obj.Name End if next if it finds it for each obj in Activesheet.OleObjects if typeof obj.Object is MSForms.Commandbutton if lcase(obj.name) = "commandbutton2" then obj.delete end if End if next -- Regards, Tom Ogilvy "Johnny Fugazzi" wrote in message ... I am having problems with an excel workbook that was working fine previously. The sheet is quite large and has a couple of command buttons on it to trigger macros. I removed one of these buttons yesterday and saved the file. The worksheet now gives me an error whenever I move the mouse over one of the buttons that remain. The error is "Can't Exit Design Mode because CommandButton2 cannot be created". It appears that the CommandButton2 is still resident in my workbook somewhere, or is referenced in the code. I have looked through the VBA code and I do not see it anywhere, but it does show up in the object dropdown list at the top of the VB editior. Can someone please help me to clear out this residue? Thanks in advance |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can't exit Design mode because control 'SignCal' can not be created...? VB | Excel Discussion (Misc queries) | |||
Calendar Control: Can't exit design mode because control can't be created | Excel Programming | |||
Can't Exit Design Mode | Excel Programming | |||
Can't Exit Design Mode because Control can not be Created | Excel Programming | |||
Enter Excel Design Mode and Exit Design Mode | Excel Programming |