Private Sub NextOpen()Dim ws As Worksheet
Application.OnKey "{F2}", "module5.pophelp"
Application.OnKey "{F4}", "module5.XAB"
Application.DisplayFormulaBar = False
Application.CellDragAndDrop = False
Application.CommandBars("Shapes").Enabled = False
Application.ExecuteExcel4Macro "Show.ToolBar(""Ribbon"",False)"
For Each ws In Worksheets
ws.Activate
With ActiveWindow
.DisplayHeadings = False
.DisplayGridlines = False
End With
Next ws
Application.OnKey "%{F11}", "module5.nope"
Application.OnKey "{ESC}", "module5.esc"
Application.OnKey "%u"
Dim W As Worksheet
'Opening on the home page
Application.Run "module5.destructure"
Application.Run "Module1.Command"
CommandBars("ply").Enabled = False
Application.Run "Module1.HideAllExceptScheduler"
If Sheets("Settings").Range("Q4").Value = "" Then
Sheets("Initial").Visible = True
Sheets("Initial").Select
Sheets("Home").Visible = xlSheetVeryHidden
Sheets("Scheduler").Visible = xlSheetVeryHidden
Else
Sheets("Home").Visible = True
Sheets("Home").Select
ActiveSheet.Unprotect "P"
Rows("1:60").Hidden = False
ActiveSheet.Shapes.Range(Array("hometext")).Visible = True
ActiveSheet.Shapes.Range(Array("homebubble")).Visible = True
Range("B5").Select
ActiveWindow.ScrollRow = 1
ActiveSheet.Protect "P", _
DrawingObjects:=True, Contents:=True, Scenarios:=True _
, AllowFormattingCells:=True, AllowFormattingColumns:=True, UserInterfaceOnly:=True, _
AllowFormattingRows:=True
End If
Call Verify
Call Nameopener
End Sub