#1   Report Post  
Posted to microsoft.public.excel.misc
Mike Rogers
 
Posts: n/a
Default Change event?

I have the following code in "This woorkbook"

Private Sub Workbook_Open()
Application.CommandBars("Worksheet Menu Bar").Enabled = False
Application.CommandBars("Standard").Enabled = False
Application.CommandBars("Formatting").Enabled = False
Application.CommandBars("Cell").Enabled = False
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Worksheet Menu Bar").Enabled = True
Application.CommandBars("Standard").Enabled = True
Application.CommandBars("Formatting").Enabled = True
Application.CommandBars("Cell").Enabled = True
Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
End Sub

If the user closes, via the X in the upper right corner, the formula bar and
the status bar pops back on the worksheet and stays there if they "cancel".
Is it possible to have a change event added to the code to change them back
to "False" when any cell is activated. All I need is for them to not be
visible long enough to take advantage of them.

Thanks

Mike Rogers
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson
 
Posts: n/a
Default Change event?

Maybe using the workbook_Activate and Workbook_deactivate would be sufficient.



Mike Rogers wrote:

I have the following code in "This woorkbook"

Private Sub Workbook_Open()
Application.CommandBars("Worksheet Menu Bar").Enabled = False
Application.CommandBars("Standard").Enabled = False
Application.CommandBars("Formatting").Enabled = False
Application.CommandBars("Cell").Enabled = False
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Worksheet Menu Bar").Enabled = True
Application.CommandBars("Standard").Enabled = True
Application.CommandBars("Formatting").Enabled = True
Application.CommandBars("Cell").Enabled = True
Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
End Sub

If the user closes, via the X in the upper right corner, the formula bar and
the status bar pops back on the worksheet and stays there if they "cancel".
Is it possible to have a change event added to the code to change them back
to "False" when any cell is activated. All I need is for them to not be
visible long enough to take advantage of them.

Thanks

Mike Rogers


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
Mike Rogers
 
Posts: n/a
Default Change event?

Dave

Thanks for the direction...that works great. The formula tool bar still
pops back on the worksheet but only when you select the save "yes" or save
"no" option. And by then it is closing either saving or not, which ever was
selected. Thanks for all your help!!! It is really appreciated.

Mike Rogers

"Dave Peterson" wrote:

Maybe using the workbook_Activate and Workbook_deactivate would be sufficient.



Mike Rogers wrote:

I have the following code in "This woorkbook"

Private Sub Workbook_Open()
Application.CommandBars("Worksheet Menu Bar").Enabled = False
Application.CommandBars("Standard").Enabled = False
Application.CommandBars("Formatting").Enabled = False
Application.CommandBars("Cell").Enabled = False
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars("Worksheet Menu Bar").Enabled = True
Application.CommandBars("Standard").Enabled = True
Application.CommandBars("Formatting").Enabled = True
Application.CommandBars("Cell").Enabled = True
Application.DisplayFormulaBar = True
Application.DisplayStatusBar = True
End Sub

If the user closes, via the X in the upper right corner, the formula bar and
the status bar pops back on the worksheet and stays there if they "cancel".
Is it possible to have a change event added to the code to change them back
to "False" when any cell is activated. All I need is for them to not be
visible long enough to take advantage of them.

Thanks

Mike Rogers


--

Dave Peterson

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
Worksheet Change event LAF Excel Discussion (Misc queries) 3 January 4th 06 02:08 AM
How do I link two cells as to allow me to change the value in eit. jpvlvt Excel Discussion (Misc queries) 3 January 26th 05 01:28 AM
automatic color change in cells using a drop down list kennethwt Excel Worksheet Functions 1 January 21st 05 06:37 PM
Excel Automation SelectionChange event cpotts Excel Discussion (Misc queries) 1 December 20th 04 05:15 PM
Change of Row event crazybass2 Excel Discussion (Misc queries) 7 December 7th 04 06:21 PM


All times are GMT +1. The time now is 09:30 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"