ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Freeze Location of Hidden Toolbars? (https://www.excelbanter.com/excel-programming/335791-freeze-location-hidden-toolbars.html)

Bill P

Freeze Location of Hidden Toolbars?
 
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


Jim Rech

Freeze Location of Hidden Toolbars?
 
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
"Bill P" wrote in message
oups.com...
| 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
|



Bill P

Freeze Location of Hidden Toolbars?
 
Thanks, Jim. It works correctly now.

- Bill



All times are GMT +1. The time now is 06:24 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com