Toolbars not appearing

B

Bill P

Hi everyone,

In my Excel app (XL2002), I hide all the toolbars and restore them on a
close or deactivate event. Here's my code to restore them.

' Restores all of the hidden toolbars
Sub RestoreAllToolBars()
Dim vToolbars As Variant, iIndex As Integer
vToolbars = GetAllSettings(APP_NAME, TOOLBAR_SECTION)

Application.ScreenUpdating = False

For iIndex = LBound(vToolbars) To UBound(vToolbars)
If vToolbars(iIndex, 1) Then
With Application.CommandBars(vToolbars(iIndex, 0))
.Visible = True
.Protection = msoBarNoProtection
End With
End If
Next iIndex

Application.ScreenUpdating = True
End Sub

When I close my Excel app, the code restores the toolbars (if another
workbook is open), but they don't appear right away. Surprisingly
enough, if I have another workbook open, when I right-click on the area
in the other workbook where they should be, they are shown as checked
off, meaning they were restored, but are not visible. Only when I
minimize and maximize that other workbook do they reappear. What is
going on here?

Thanks in advance,

- Bill
 
J

Jim Rech

My best guess is that this is a video refresh/redraw issue rather than a
problem with Excel. If that's the case the only "solution" I know of is to
get the latest drivers for your video card.

--
Jim
| Hi everyone,
|
| In my Excel app (XL2002), I hide all the toolbars and restore them on a
| close or deactivate event. Here's my code to restore them.
|
| ' Restores all of the hidden toolbars
| Sub RestoreAllToolBars()
| Dim vToolbars As Variant, iIndex As Integer
| vToolbars = GetAllSettings(APP_NAME, TOOLBAR_SECTION)
|
| Application.ScreenUpdating = False
|
| For iIndex = LBound(vToolbars) To UBound(vToolbars)
| If vToolbars(iIndex, 1) Then
| With Application.CommandBars(vToolbars(iIndex, 0))
| .Visible = True
| .Protection = msoBarNoProtection
| End With
| End If
| Next iIndex
|
| Application.ScreenUpdating = True
| End Sub
|
| When I close my Excel app, the code restores the toolbars (if another
| workbook is open), but they don't appear right away. Surprisingly
| enough, if I have another workbook open, when I right-click on the area
| in the other workbook where they should be, they are shown as checked
| off, meaning they were restored, but are not visible. Only when I
| minimize and maximize that other workbook do they reappear. What is
| going on here?
|
| Thanks in advance,
|
| - 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