Hi all...
I'm wanting to run a macro (Menu_Hide) that activates some worksheet protection on when the workbook is first opened. (The macro below is in ThisWorkbook )
Private Sub Workbook_open()
Menu_Hide
End Sub
Menu_Hide is run from elsewhere when required (There is also a Menu_Show button). Menu_Hide runs perfectly well each time when manually activated by it's own button.
Now, what I don't understand is that when the workbook is opened the first time the Private Sub Workbook_open() runs, but Menu_Hide doesn't appear to have run (or taken affect). If I close the workbook and re-open it it does appear to have run. If I close & open a third time it doesn't, a 4th time it does.... and so on. ?
Does anyone have an explanation and resolution for this behaviour? How can I get it to run the Menu_Hide macro reliably each time the workbook is opened?
Thanks in advance for your time and help with this, much appreciated.
I'm wanting to run a macro (Menu_Hide) that activates some worksheet protection on when the workbook is first opened. (The macro below is in ThisWorkbook )
Private Sub Workbook_open()
Menu_Hide
End Sub
Menu_Hide is run from elsewhere when required (There is also a Menu_Show button). Menu_Hide runs perfectly well each time when manually activated by it's own button.
Now, what I don't understand is that when the workbook is opened the first time the Private Sub Workbook_open() runs, but Menu_Hide doesn't appear to have run (or taken affect). If I close the workbook and re-open it it does appear to have run. If I close & open a third time it doesn't, a 4th time it does.... and so on. ?
Does anyone have an explanation and resolution for this behaviour? How can I get it to run the Menu_Hide macro reliably each time the workbook is opened?
Thanks in advance for your time and help with this, much appreciated.