What is the best way to hide/unhide a toolbar via macro?
I used the following code:
and later in the code:
I do have text in parentheses in the name of my toolbar, so I hope that's not the problem. If it is I could change it.
The problem is that in some cases everything works fine, but in others cases I get stuck on the code that is supposed to make it visible again. I get the following error:
Method 'Visible' of object 'CommandBar' failed.
Any suggestions on how to get this to work all the time would be greatly appreciated!
I used the following code:
Code:
CommandBars("MyToolbar(Details)").Visible = False
and later in the code:
Code:
CommandBars("MyToolbar(Details)").Visible = True
I do have text in parentheses in the name of my toolbar, so I hope that's not the problem. If it is I could change it.
The problem is that in some cases everything works fine, but in others cases I get stuck on the code that is supposed to make it visible again. I get the following error:
Method 'Visible' of object 'CommandBar' failed.
Any suggestions on how to get this to work all the time would be greatly appreciated!