Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
CM CM is offline
external usenet poster
 
Posts: 136
Default macro to exit design mode

I am creating protected worksheets for users. When some users open them,
their Excel is already in Design Mode.

I need code to 'exit' design mode automatically. Can anyone advise please?

--

cm
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default macro to exit design mode

see if this helps:

Sub ExitDesignMode()

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

End Sub
--
jb


"cm" wrote:

I am creating protected worksheets for users. When some users open them,
their Excel is already in Design Mode.

I need code to 'exit' design mode automatically. Can anyone advise please?

--

cm

  #3   Report Post  
Posted to microsoft.public.excel.programming
CM CM is offline
external usenet poster
 
Posts: 136
Default macro to exit design mode

one more thing - need this to run on workbook_open -- get an error of 'with
block variable not set' -- what do I need to edit?



cm


"john" wrote:

see if this helps:

Sub ExitDesignMode()

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

End Sub
--
jb


"cm" wrote:

I am creating protected worksheets for users. When some users open them,
their Excel is already in Design Mode.

I need code to 'exit' design mode automatically. Can anyone advise please?

--

cm

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default macro to exit design mode

keep the procedure in standard module and call it from open event

Private Sub Workbook_Open()
Call ExitDesignMode
End Sub
--
jb


"cm" wrote:

one more thing - need this to run on workbook_open -- get an error of 'with
block variable not set' -- what do I need to edit?



cm


"john" wrote:

see if this helps:

Sub ExitDesignMode()

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

End Sub
--
jb


"cm" wrote:

I am creating protected worksheets for users. When some users open them,
their Excel is already in Design Mode.

I need code to 'exit' design mode automatically. Can anyone advise please?

--

cm

Reply
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
Unable to exit Design Mode theschweik Excel Programming 4 May 21st 09 10:47 AM
run procedure when exit design mode Wim SKW Excel Programming 3 July 11th 07 12:21 PM
I can't exit from Design mode anymore Ray Excel Discussion (Misc queries) 0 April 20th 06 02:31 PM
Can't Exit Design Mode MT DOJ Help Desk[_2_] Excel Programming 4 December 6th 03 06:11 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 01:35 AM.

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

About Us

"It's about Microsoft Excel"