Hello All,
I am having a problem with the before_save macro:
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
For Each sh In Sheets
sh.Visible = xlSheetVeryHidden
Worksheets(quot;Overviewquot;).Visible = True
Next sh
Next
End Sub
It does nothing when I save. The macro doesn't seem to run at all. If
anyone could help me on this, I would appreciate it.
JasonFirtsly, it needs to be in ThisWorkbook code module.
Also, it is broken
Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
Boolean)
Worksheets(quot;Overviewquot;).Visible = xlSheetVisible
For Each sh In ThisWorkbook.Sheets
sh.Visible = xlSheetVeryHidden
Next sh
End Sub
--
HTH
Bob Phillips
(remove xxx from email address if mailing direct)
quot;Jayquot; gt; wrote in message oups.com...
gt; Hello All,
gt; I am having a problem with the before_save macro:
gt;
gt; Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As
gt; Boolean)
gt; For Each sh In Sheets
gt; sh.Visible = xlSheetVeryHidden
gt; Worksheets(quot;Overviewquot;).Visible = True
gt; Next sh
gt; Next
gt; End Sub
gt;
gt; It does nothing when I save. The macro doesn't seem to run at all. If
gt; anyone could help me on this, I would appreciate it.
gt; Jason
gt;
Bob,
I do have it in ThisWorkbook, and I attempted to fix it, and it still
doesn't work.
JayIn the immediate window in the VBIDE type
Application.EnableEvents = True
and return.
--
HTH
Bob Phillips
(remove xxx from email address if mailing direct)
quot;Jayquot; gt; wrote in message oups.com...
gt; Bob,
gt; I do have it in ThisWorkbook, and I attempted to fix it, and it still
gt; doesn't work.
gt; Jay
gt;
Hey Bob,
Sorry for the late response, thank you, it worked.
JasonHey Bob,
Sorry for the late response, thank you, it worked.
Jason
- Aug 07 Thu 2008 20:45
Problem with Before_Save Macro
close
全站熱搜
留言列表
發表留言
留言列表

