LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Can't Exit Design Mode because CommandButton2 cannot be created

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
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
Can't exit Design mode because control 'SignCal' can not be created...? VB Andrew[_8_] Excel Discussion (Misc queries) 0 November 26th 08 03:34 PM
Calendar Control: Can't exit design mode because control can't be created Rone Excel Programming 0 May 24th 04 04:01 PM
Can't Exit Design Mode MT DOJ Help Desk[_2_] Excel Programming 4 December 6th 03 06:11 AM
Can't Exit Design Mode because Control can not be Created MT DOJ Help Desk Excel Programming 0 November 21st 03 05:37 AM
Enter Excel Design Mode and Exit Design Mode Bill Lunney Excel Programming 0 August 4th 03 07:48 AM


All times are GMT +1. The time now is 08:51 PM.

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

About Us

"It's about Microsoft Excel"