Compile error: Variable not defined
I can't see where I have gone wrong.
VBA Code:
x = ActiveSheet.Name
I can't see where I have gone wrong.
VBA Code:
Private Sub Workbook_SheetActivate(ByVal wks As Object)
With Application
x = ActiveSheet.Name
For Each wks In Worksheets
Sheets(wks.Name).Select
ActiveWindow.DisplayHeadings = False
ActiveWindow.DisplayHorizontalScrollBar = False
ActiveWindow.DisplayVerticalScrollBar = True
.DisplayFullScreen = True
.DisplayFormulaBar = False
.DisplayStatusBar = False
.CommandBars("Full Screen").Visible = False
.CommandBars("Worksheet Menu Bar").Enabled = False
.CommandBars("Standard").Visible = False
.CommandBars("Formatting").Visible = False
Next wks
Sheets(x).Select
End With
End Sub