Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have an Excel 97-2003 add-in that includes a toolbar that includes a copy
of Excel's Design Mode toolbar button (View | Toolbars | Control Toolbox). My users click this button to put the worksheet into design mode so they can change the layout of controls (command buttons, etc) programatically placed onto the worksheet. Another button on this toolbar allows them to save their updated worksheet design. If they click this button while they are still in design mode, then when my VBA code gets around to performing: thisWorkbook.ActiveSheet.Copy after:=thatWorkbook.Worksheets(1) it gets "Application-defined or object-defined error" error message. The way I've implemented the design mode, my code never sees the user's button click that puts them into (or out of) design mode. So I currently have no way to "remember" that I'm currently in design mode and get myself out before trying to save the redesigned worksheet (of course that assumes I know how to programatically get our of design mode and I don't). So a few questions: - Is there a way for my code to detect that the workbook (or is it the project?) is still in design mode? If so how? - If there is, is there some way for my code to get out of design mode? - Is there some other way of having a toolbar button toggle in and out of design mode where my code is in the execution loop rather than just copying Excel's Design Mode toolbar button onto my toolbar? TIA, josh |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Run-time error '50290': Application-defined or object-defined erro | Excel Discussion (Misc queries) | |||
Application-defined or object-defined error - missing the basics | Excel Programming | |||
Macro Run-time Error 1004 Application Defined or Object Defined Error | Excel Programming | |||
Runtime Error 1004 -- Application Defined or Object Defined Error | Excel Programming |