How do you get rid of this?

KenHigg

Registered User
Local time
Today, 03:48
Joined
Jun 9, 2004
Messages
13,327
attachment.php


???
kh
 
I be darn, perfect. Thxs!

A couple more - Is there a list of what the CommandBars(x)'s are so I can turn certain ones back on?

How would I disable the app min and restore buttons?

kh
 
KenHigg said:
How would I disable the app min and restore buttons?
I have seen code floating around but I could not get it to work when I tried it and that was a long time ago. I did not save my feable attempts.
.
KenHigg said:
A couple more - Is there a list of what the CommandBars(x)'s are so I can turn certain ones back on?
Replace the acToolbarNo with acToolbarWhereApprop to turn them back on.

DoCmd.ShowToolbar "Menu Bar", acToolbarNo
DoCmd.ShowToolbar "Database Default Toolbar", acToolbarNo
DoCmd.ShowToolbar "Database Design Toolbar", acToolbarNo
DoCmd.ShowToolbar "Database", acToolbarNo
DoCmd.ShowToolbar "Relationship", acToolbarNo
DoCmd.ShowToolbar "Table Design", acToolbarNo
DoCmd.ShowToolbar "Table Datasheet", acToolbarNo
DoCmd.ShowToolbar "Query Design", acToolbarNo
DoCmd.ShowToolbar "Query Datasheet", acToolbarNo
DoCmd.ShowToolbar "Form Design", acToolbarNo
DoCmd.ShowToolbar "Form View", acToolbarNo
DoCmd.ShowToolbar "Filter/Sort", acToolbarNo
DoCmd.ShowToolbar "Report Design", acToolbarNo
DoCmd.ShowToolbar "Print Preview", acToolbarNo
DoCmd.ShowToolbar "Toolbox", acToolbarNo
DoCmd.ShowToolbar "Formatting (Form/Report)", acToolbarNo
DoCmd.ShowToolbar "Formatting (Datasheet)", acToolbarNo
DoCmd.ShowToolbar "Macro Design", acToolbarNo
DoCmd.ShowToolbar "Visual Basic", acToolbarNo 'does not exist in Access 2003
DoCmd.ShowToolbar "Utility 1", acToolbarNo
DoCmd.ShowToolbar "Utility 2", acToolbarNo
DoCmd.ShowToolbar "Web", acToolbarNo
DoCmd.ShowToolbar "Source Code Control", acToolbarNo
 
Code:
Option Explicit
Option Compare Text

[color=green]'   This will list everything in the CommandBar collection.
'   (There’s a lot more in there than I’ve ever seen before.)
'
'   You might have to create a reference to Microsoft [b]Office[/b] 8.0 Object Library
'   or whatever version you are running.[/color]
Private Sub RemoveCommandBars()
    Dim cmdBar As CommandBar
    
    For Each cmdBar In CommandBars
        Debug.Print cmdBar.Name
    Next cmdBar

End Sub
Hope that helps.

Regards,
Chris.
 
Last edited:
Yes, that did produce a lot of command bar options!

I had to change the Dim for the Dim cmdBar As CommandBar did not work for me with Access 97 or 2003. I did have the correct reference to the Microsoft Access 8.0 [or 11.0] Object Library. Not sure how to Dim it but this worked...
Code:
Public Function RemoveCommandBars()
    
    Dim cmdBar As Object
    
    For Each cmdBar In CommandBars
        Debug.Print cmdBar.Name
    Next cmdBar
    
End Function
 
Typo in original reply, the reference should have been…

Microsoft Office 8.0 Object Library

I’ll edit the reply to correct it.

Anyhow if Dim cmdBar As Object works then that’s great.

Thanks for the reply and regards,
Chris.
 

Users who are viewing this thread

Back
Top Bottom