Freeze Location of Hidden Toolbars?

B

Bill P

In an Excel application I am developing (XL2002 on Win XP Pro), I hide
all of the toolbars displayed on the screen and leave only the
Worksheet Menu Bar. Ideally, I'd like to freeze the position of all
the toolbars before I hide them, then unfreeze them when they are
revealed again.

However, if the user moves the Worksheet Menu Bar while all the other
ones are hidden, they appear rearranged when all of them are revealed.
I looked at the CommandBar object, but couldn't find a property or
method that would solve this problem. I tried the following when
revealing the toolbars, but that didn't work as planned:

Application.CommandBars("Worksheet Menu Bar").Top = 0

Does anyone know how to fix this problem?

Thanks,

- Bill
 
J

Jim Rech

However, if the user moves the Worksheet Menu Bar while

You can prevent that:

CommandBars("worksheet menu bar").Protection = msoBarNoMove

You'd want to reset it to msoBarNoProtection on exiting.

--
Jim
| In an Excel application I am developing (XL2002 on Win XP Pro), I hide
| all of the toolbars displayed on the screen and leave only the
| Worksheet Menu Bar. Ideally, I'd like to freeze the position of all
| the toolbars before I hide them, then unfreeze them when they are
| revealed again.
|
| However, if the user moves the Worksheet Menu Bar while all the other
| ones are hidden, they appear rearranged when all of them are revealed.
| I looked at the CommandBar object, but couldn't find a property or
| method that would solve this problem. I tried the following when
| revealing the toolbars, but that didn't work as planned:
|
| Application.CommandBars("Worksheet Menu Bar").Top = 0
|
| Does anyone know how to fix this problem?
|
| Thanks,
|
| - Bill
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top