Macro not doing?
- From: "Sandy" <sandy_stephen@xxxxxxxxxxxxxxxxx>
- Date: Thu, 24 May 2007 16:33:14 +0100
The following doesn,t work and I have no idea why - any suggestions?
I am assuming the code should run when the work*** "Data Input" is
selected.
'Code in Sheet1 "Data Input"
Private Sub Worksheet_Activate()
Sheets("Data Input").Unprotect Password:="********"
ClearApplicationControls
Sheets("Data Input").Protect Password:="********"
End Sub
'Code in Module2
Sub ClearApplicationControls()
Application.ScreenUpdating = False
With ActiveWindow
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
.DisplayWorkbookTabs = True
.DisplayHeadings = False
.WindowState = xlMaximized
End With
Dim OneBar As CommandBar
On Error Resume Next
For Each OneBar In CommandBars
OneBar.Visible = False
Next
On Error GoTo 0
With Application
.DisplayFullScreen = False
.DisplayFormulaBar = False
End With
Application.ScreenUpdating = True
End Sub
.
- Follow-Ups:
- RE: Macro not doing?
- From: Barb Reinhardt
- RE: Macro not doing?
- Prev by Date: RE: Is it possible to hide and show buttons?
- Next by Date: Re: Other users of my Excel VBA macros
- Previous by thread: RE: Is it possible to hide and show buttons?
- Next by thread: RE: Macro not doing?
- Index(es):