I have the code below in a sheet I open from another workbooks code.
Sub Autpen()
Dim TA As String
If Sheets.Count > 4 Then
TA = Worksheets("Stats").Range("TopAssemblyNumber")
Sheets(TA).Select
End If
CreateCustomCommandBar
End Sub
It does execute upon opening because the sheet referred to is opened as requested. However the call to the CreateCustomCommandBar does not seem to run as the menus do not appear however if I run that call manually it does create the menu bar as requested. It appears that the call is not getting made with the Autpen sub. Is Autpen a bit flaky? Should I put the menu bar creation somewhere else?
Sub Autpen()
Dim TA As String
If Sheets.Count > 4 Then
TA = Worksheets("Stats").Range("TopAssemblyNumber")
Sheets(TA).Select
End If
CreateCustomCommandBar
End Sub
It does execute upon opening because the sheet referred to is opened as requested. However the call to the CreateCustomCommandBar does not seem to run as the menus do not appear however if I run that call manually it does create the menu bar as requested. It appears that the call is not getting made with the Autpen sub. Is Autpen a bit flaky? Should I put the menu bar creation somewhere else?