I have the following code in quot;This woorkbookquot;
Private Sub Workbook_Open()
Application.CommandBars(quot;Worksheet Menu Barquot;).Enabled = False
Application.CommandBars(quot;Standardquot;).Enabled = False
Application.CommandBars(quot;Formattingquot;).Enabled = False
Application.CommandBars(quot;Cellquot;).Enabled = False
Application.DisplayFormulaBar = False
Application.DisplayStatusBar = False
End Sub
Private Sub Workbook_BeforeClose(Cancel As Boolean)
Application.CommandBars(quot;Worksheet Menu Barquot;).Enabled = True
Application.CommandBars(quot;Standardquot;).Enabled = True
Application.CommandBars(quot;Formattingquot;).Enabled = True
Application.CommandBars(quot;Cellquot;).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 quot;cancelquot;.
Is it possible to have a change event added to the code to change them back
to quot;Falsequot; 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
Maybe using the workbook_Activate and Workbook_deactivate would be sufficient.
Mike Rogers wrote:
gt;
gt; I have the following code in quot;This woorkbookquot;
gt;
gt; Private Sub Workbook_Open()
gt; Application.CommandBars(quot;Worksheet Menu Barquot;).Enabled = False
gt; Application.CommandBars(quot;Standardquot;).Enabled = False
gt; Application.CommandBars(quot;Formattingquot;).Enabled = False
gt; Application.CommandBars(quot;Cellquot;).Enabled = False
gt; Application.DisplayFormulaBar = False
gt; Application.DisplayStatusBar = False
gt; End Sub
gt; Private Sub Workbook_BeforeClose(Cancel As Boolean)
gt; Application.CommandBars(quot;Worksheet Menu Barquot;).Enabled = True
gt; Application.CommandBars(quot;Standardquot;).Enabled = True
gt; Application.CommandBars(quot;Formattingquot;).Enabled = True
gt; Application.CommandBars(quot;Cellquot;).Enabled = True
gt; Application.DisplayFormulaBar = True
gt; Application.DisplayStatusBar = True
gt; End Sub
gt;
gt; If the user closes, via the X in the upper right corner, the formula bar and
gt; the status bar pops back on the worksheet and stays there if they quot;cancelquot;.
gt; Is it possible to have a change event added to the code to change them back
gt; to quot;Falsequot; when any cell is activated. All I need is for them to not be
gt; visible long enough to take advantage of them.
gt;
gt; Thanks
gt;
gt; Mike Rogers
--
Dave Peterson
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 quot;yesquot; or save
quot;noquot; 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
quot;Dave Petersonquot; wrote:
gt; Maybe using the workbook_Activate and Workbook_deactivate would be sufficient.
gt;
gt;
gt;
gt; Mike Rogers wrote:
gt; gt;
gt; gt; I have the following code in quot;This woorkbookquot;
gt; gt;
gt; gt; Private Sub Workbook_Open()
gt; gt; Application.CommandBars(quot;Worksheet Menu Barquot;).Enabled = False
gt; gt; Application.CommandBars(quot;Standardquot;).Enabled = False
gt; gt; Application.CommandBars(quot;Formattingquot;).Enabled = False
gt; gt; Application.CommandBars(quot;Cellquot;).Enabled = False
gt; gt; Application.DisplayFormulaBar = False
gt; gt; Application.DisplayStatusBar = False
gt; gt; End Sub
gt; gt; Private Sub Workbook_BeforeClose(Cancel As Boolean)
gt; gt; Application.CommandBars(quot;Worksheet Menu Barquot;).Enabled = True
gt; gt; Application.CommandBars(quot;Standardquot;).Enabled = True
gt; gt; Application.CommandBars(quot;Formattingquot;).Enabled = True
gt; gt; Application.CommandBars(quot;Cellquot;).Enabled = True
gt; gt; Application.DisplayFormulaBar = True
gt; gt; Application.DisplayStatusBar = True
gt; gt; End Sub
gt; gt;
gt; gt; If the user closes, via the X in the upper right corner, the formula bar and
gt; gt; the status bar pops back on the worksheet and stays there if they quot;cancelquot;.
gt; gt; Is it possible to have a change event added to the code to change them back
gt; gt; to quot;Falsequot; when any cell is activated. All I need is for them to not be
gt; gt; visible long enough to take advantage of them.
gt; gt;
gt; gt; Thanks
gt; gt;
gt; gt; Mike Rogers
gt;
gt; --
gt;
gt; Dave Peterson
gt;
- Jun 22 Fri 2007 20:37
Change event?
close
全站熱搜
留言列表
發表留言