Replacing Toolbars and screen not refreshing

Seanzies

Board Regular
Joined
Nov 19, 2005
Messages
212
I have a procedure that runs that hides all toolbars on the Workbook_Open()
and makes them visible on a Workbook_BeforeClose()

With the Application.ScreenUpdating = True I set do the following:


For Each Cell In PersistentData.GetSavedToolbarRange().Cells
BarName = Cell.Value 'the name of the toolbar
If (BarName = "") Then
Exit For
Else
Application.CommandBars(BarName).Enabled = True
Application.CommandBars(BarName).Position = msoBarTop
Application.CommandBars(BarName).Visible = True
End If
Next

The problem that I am having is that when you have more than one workbook open in the same instance of excel running this procedure is running correctly but you can only see one of the toolbars displayed and the rest appear to not be visible when in fact, according to excel under View --> Toolbars they are. So its like Excel is not repainting / refreshing the screen to show all of the toolbars that are enabled and visible.

How can I fix this.

Sincerely,

Very frustrated Programmer & Users

BTW - I didn't see the option to add code tags, they used to be a button you could click to add a code tag..where did they go?
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,675
Messages
5,838,718
Members
430,566
Latest member
ChanchalSingh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top