Hello,
I am using Access 97 SR-2.
When I try and define a command bar (Dim cbf As CommandBar) I get the compile error: User-defined type not defined. <img src=/S/spook.gif border=0 alt=spook width=15 height=15>
My code:
Option Compare Database
Option Explicit
Sub mybar()
Dim cbar1 As CommandBar
Dim cbccustom As commandbarcontrol
Set cbr = CommandBars("menu")
Set cbar1 = cbr.Controls.Add(mscontrolbutton)
With cbar1
.Caption = "custom"
.tab = "test menu"
End With
End Sub
Do I need to activate a setup toggle for Access?
I have even copied the example from help and get the same error.



