M
Martin
Hello,
I have a workbook that I need to share with around 50 users in 3 locations.
I have the following code that works on the Workbook_Activate as follows:
Private Sub Workbook_Activate()
Sheets(Array("Main Menu", "H1", "H2", "Help")).Select
Sheets("Main Menu").Activate
With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayWorkbookTabs = False
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
End With
Application.DisplayFormulaBar = False
Sheets("Main Menu").Select
Range("M5").Select
Application.CommandBars("Worksheet Menu Bar").Enabled = False
Application.CommandBars("Standard").Enabled = False
Application.CommandBars("Reviewing").Enabled = False
Application.CommandBars("Formatting").Enabled = False
Application.CommandBars("Drawing").Enabled = False
Application.CommandBars("Chart").Enabled = False
Application.CommandBars("Control Toolbox").Enabled = False
ActiveSheet.Calculate
End Sub
This works fine when the workbook is not shared. As soon as I share it the
code doesn't seem to run. I have this code available to run on a short cut
key and I can run it using the shortcut key but I just cant seem to get it to
run on the workbook_activate command once shared.
Can anyone advise how I can overcome this?
Many thanks in advance.
Martin
I have a workbook that I need to share with around 50 users in 3 locations.
I have the following code that works on the Workbook_Activate as follows:
Private Sub Workbook_Activate()
Sheets(Array("Main Menu", "H1", "H2", "Help")).Select
Sheets("Main Menu").Activate
With ActiveWindow
.DisplayGridlines = False
.DisplayHeadings = False
.DisplayWorkbookTabs = False
.DisplayHorizontalScrollBar = True
.DisplayVerticalScrollBar = True
End With
Application.DisplayFormulaBar = False
Sheets("Main Menu").Select
Range("M5").Select
Application.CommandBars("Worksheet Menu Bar").Enabled = False
Application.CommandBars("Standard").Enabled = False
Application.CommandBars("Reviewing").Enabled = False
Application.CommandBars("Formatting").Enabled = False
Application.CommandBars("Drawing").Enabled = False
Application.CommandBars("Chart").Enabled = False
Application.CommandBars("Control Toolbox").Enabled = False
ActiveSheet.Calculate
End Sub
This works fine when the workbook is not shared. As soon as I share it the
code doesn't seem to run. I have this code available to run on a short cut
key and I can run it using the shortcut key but I just cant seem to get it to
run on the workbook_activate command once shared.
Can anyone advise how I can overcome this?
Many thanks in advance.
Martin