Hi All:
I was playing around and was trying to help someone out on the board in regards to this Post: "Formula bar won't disappear"
I put the code below in a NEW Workbook and ran it and now I have messed up MY own Excel.
Life as a VBA "EXTREME" Rookie is not always fun...
ANYWAY I am hoping that someone can get me back up and running.
Code placed in ThisWorkbook:
This code was placed in Module 1:
So as I say I ran the code and closed the Workbook and then as the code states all my toolbars etc were gone... SO after I FINALLY figured out how to get back into VBA (Right Clicking on TABS brought up nothing and there is Tools/Macro Bar (Wrong terminology sorry) to get me to VBA. Anyway I revered the code (I think) and ran it again and most things that I know of came back but NOT my main bar that I use to Open, Save, View, Tool Options, Help Menu. I am not sure what this bar is actually called but I hope you know what I am referring to. Here is the REVERES ED code I ran:
SORRY for the Long Post... Can anyone assist?
THANKS,
Mark
I was playing around and was trying to help someone out on the board in regards to this Post: "Formula bar won't disappear"
I put the code below in a NEW Workbook and ran it and now I have messed up MY own Excel.
Life as a VBA "EXTREME" Rookie is not always fun...
ANYWAY I am hoping that someone can get me back up and running.
Code placed in ThisWorkbook:
Code:
Private Sub Workbook_Open()
Call HideMenus
If Worksheets("Input").Range("B5").Value = "" _
Then Worksheets("Input").Range("B5").Value = (Date - 1)
With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayWorkbookTabs = False
.DisplayHorizontalScrollBar = False
End With
End Sub
This code was placed in Module 1:
Code:
Sub HideMenus()
Dim cbars As CommandBar
Application.ScreenUpdating = False
For Each cbars In Application.CommandBars
cbars.Enabled = False
Next
With Application
.CommandBars("Worksheet Menu Bar").Enabled = False
.DisplayFormulaBar = False
.DisplayStatusBar = False
.CommandBars("Standard").Visible = False
.CommandBars("Formatting").Visible = False
.Caption = "Konove Night Audit.xls"
.ScreenUpdating = True
End With
ActiveWindow.Zoom = 93
Application.DisplayFullScreen = True
End Sub
Code:
Private Sub Workbook_Open()
Call HideMenus
If Worksheets("Input").Range("B5").Value = "" _
Then Worksheets("Input").Range("B5").Value = (Date - 1)
With ActiveWindow
.DisplayGridlines = True
.DisplayHeadings = True
.DisplayWorkbookTabs = True
.DisplayHorizontalScrollBar = True
End With
End Sub
Code:
Sub HideMenus()
Dim cbars As CommandBar
Application.ScreenUpdating = False
For Each cbars In Application.CommandBars
cbars.Enabled = True
Next
With Application
.CommandBars("Worksheet Menu Bar").Enabled = False
.DisplayFormulaBar = True
.DisplayStatusBar = True
.CommandBars("Standard").Visible = True
.CommandBars("Formatting").Visible = True
.Caption = "Konove Night Audit.xls"
.ScreenUpdating = True
End With
ActiveWindow.Zoom = 100
Application.DisplayFullScreen = True
End Sub
SORRY for the Long Post... Can anyone assist?
THANKS,
Mark