Results 1 to 2 of 2
  1. #1
    Lounger
    Join Date
    Dec 2000
    Location
    Ohio, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Custom Menu Access 97

    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.

  2. #2
    Lounger
    Join Date
    Dec 2000
    Location
    Ohio, USA
    Posts
    28
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Custom Menu Access 97

    Hello,
    I found the answer on MSDN. Making Sense of Access 97's Command Bars by D. Shank. As I thought it was the need to turn on a switch.
    Thank for your time.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •