AllExperts > Excel 
Search      
Excel
Volunteer
Answers to thousands of questions
 Home · More Excel Questions · Answer Library  · Encyclopedia ·
More Excel Answers
Question Library

Ask a question about Excel
Volunteer
Experts of the Month
Expert Login

Awards

About Us
Tell friends
Link to Us
Disclaimer

 
 
 
 
About Gyula Gulyas
Expertise
I can answer most questions related to macros, worksheet functions, VBA, Office automation (calling/using other MS Office programs) and geocoding using Google Maps. I have 10 years experience using and programming in MS Excel and other office applications. I have extensive experience linking and using DLLs in Excel.

Experience
Macros, worksheet functions, VBA, linking of DLLs and Office automation, geocoding using Google Maps.

 
   

You are here:  Experts > Computing/Technology > Microsoft Software > Excel > control id

Excel - control id


Expert: Gyula Gulyas - 9/6/2007

Question
Gyula:

I use:

Application.CommandBars.FindControl(id:=1605).Execute

to enter design mode. From what I can find, this is also the id for exit design mode, but if I execute the code, it only turns on the design mode. Please, what is the vba to exit design mode?

Sherry

Answer
Here you go:
Sub EnterDesignMode()
   Application.CommandBars.FindControl(ID:=1605).Execute
End Sub

Sub ExitDesignMode()
With CommandBars("Exit Design Mode").Controls(1)
   If .State = msoButtonDown Then .Execute
End With
End Sub

HTH,
Gyula

Add to this Answer   Ask a Question


 
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here
User Agreement | Privacy Policy | Kids' Privacy Policy | Help
Copyright  © 2008 About, Inc. AllExperts, AllExperts.com, and About.com are registered trademarks of About, Inc. All rights reserved.