Error Checking in Excel
Thanks Thanks:  0
Likes Likes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 13

Thread: Desperate for some VBA help

  1. #1
    New Member
    Join Date
    Feb 2002
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have a pretty robust program in Excel. It has worked fine for months. I need to work on it tonight at home but I get a message that says it cannot find the reference librabry for many of the items.

    A previous version works just fine. Any hints ? I need to make changes tonight. The file goes into production tomorrow.

    Help Please !!!

    PJ

  2. #2
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-06 19:42, Paul-Johnson wrote:
    I have a pretty robust program in Excel. It has worked fine for months. I need to work on it tonight at home but I get a message that says it cannot find the reference librabry for many of the items.

    A previous version works just fine. Any hints ? I need to make changes tonight. The file goes into production tomorrow.

    Help Please !!!

    PJ
    In the VBA Editor
    Click on Tools
    Select reference

    In the dialog listbox look for any boxes with missing in them
    These are the referneces you will need to
    reference ie. find them in your system.


    Ivan

  3. #3
    New Member
    Join Date
    Feb 2002
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have 50-60 that are unchecked. They were not ALL checked in the past.

    Is there a particularly one that I should look for ? Or, should I just include them all ?

    Thanks again

  4. #4
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-06 20:05, Paul-Johnson wrote:
    I have 50-60 that are unchecked. They were not ALL checked in the past.

    Is there a particularly one that I should look for ? Or, should I just include them all ?

    Thanks again
    Hi Paul
    Are there any refrences with the word
    "Missing" next to them ??
    These are the ones you need to find.

    Ivan

  5. #5
    New Member
    Join Date
    Feb 2002
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    When I look in the object browser and in the References dialogue box - I do not see anything with the word missing next to it

  6. #6
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-06 20:42, Paul-Johnson wrote:
    When I look in the object browser and in the References dialogue box - I do not see anything with the word missing next to it
    Hi Paul
    OK ....what is ticked in the reference box
    AND what does the program do...this will
    give me an indication as to what libraries
    you need....
    Typical Library files are....

    Visual Basics for applications, MS Excel object library, OLE automation, MS Office lirary...


    Ivan




  7. #7
    New Member
    Join Date
    Feb 2002
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Eaco of those is checked.

    The vba makes menus, uses some custom forms to create list boxes & display messages, with a bulk of the code opening other files copying & filtering data.

    The first piece of code it chokes on is "newmenu"

  8. #8
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    On 2002-03-06 21:00, Paul-Johnson wrote:
    Eaco of those is checked.

    The vba makes menus, uses some custom forms to create list boxes & display messages, with a bulk of the code opening other files copying & filtering data.

    The first piece of code it chokes on is "newmenu"
    Paul
    Could you post code that it stops on and the error.....

    Ivan

  9. #9
    New Member
    Join Date
    Feb 2002
    Posts
    47
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    The error says Compile error:
    Can't find project or library

    Sub MakeMenuBar()
    Dim NewMenuBar As CommandBar

    ' Delete menu bar if it exists
    Call DeleteMenuBar

    ' Add a menu bar
    '***** error here ******
    Set NewMenuBar = CommandBars.Add(MenuBar:=True)
    With NewMenuBar
    .Name = "DBMenubar"
    .Visible = True
    End With

    ' Copy the File menu from Worksheet Menu Bar
    CommandBars("Worksheet Menu Bar").Controls(1).Copy _
    Bar:=CommandBars("DBMenubar")


    ' Add a new menu
    Set NewMenu = NewMenuBar.Controls.Add _
    (Type:=msoControlPopup)
    NewMenu.Caption = "&Import Data"

    ' Add a new menu item
    ' This menu item imports the monthly Review _
    for data cleanup
    Set NewItem = NewMenu.Controls.Add(Type:=msoControlButton)
    With NewItem
    .Caption = "&Import Monthly Review"
    .FaceId = 721
    .OnAction = "open_monthly_review"
    End With



    ' Add a new menu item
    ' This menu item imports the monthly master _
    for report generation
    Set NewItem = NewMenu.Controls.Add(Type:=msoControlButton)
    With NewItem
    .Caption = "I&mport Monthly Data"
    .FaceId = 720
    .OnAction = "open_Monthly_master"
    End With


    ' Add a new menu
    Set NewMenu = NewMenuBar.Controls.Add _
    (Type:=msoControlPopup)
    NewMenu.Caption = "&Monthly Review"

    ' Add a new menu item
    ' This menu item .....

    Set NewItem = NewMenu.Controls.Add(Type:=msoControlButton)
    With NewItem
    .Caption = "&Upload Reviewed Data"
    .FaceId = 705
    .OnAction = "Upload_Monthly_Master"
    End With



    ' Add a new menu
    Set NewMenu = NewMenuBar.Controls.Add _
    (Type:=msoControlPopup)
    NewMenu.Caption = "&Standard Reports"


    ' Add a new menu item
    Set NewItem = NewMenu.Controls.Add(Type:=msoControlButton)
    With NewItem
    .Caption = "Weekly Report"
    '.OnAction = "GetExportFileName"
    End With

    ' Add a new menu item
    Set NewItem = NewMenu.Controls.Add(Type:=msoControlButton)
    With NewItem
    .Caption = "Monthly Report"
    .OnAction = "Create_Standard_Reports"
    End With

    ' Add a new menu item
    Set NewItem = NewMenu.Controls.Add(Type:=msoControlButton)
    With NewItem
    .Caption = "Customer Report"
    .OnAction = "Create_customer_reports"
    End With

    ' Add a new menu item
    'Set NewItem = NewMenu.Controls.Add(Type:=msoControlButton)
    'With NewItem
    '.Caption = "Exception Report"
    '.OnAction = "GetExportFileName"
    'End With

    ' Add a new menu
    Set NewMenu = NewMenuBar.Controls.Add _
    (Type:=msoControlPopup)
    NewMenu.Caption = "&Exception Reports"

    ' Add a new menu item
    Set NewItem = NewMenu.Controls.Add(Type:=msoControlButton)
    With NewItem
    .Caption = "TBD"
    ' .OnAction = "shell"
    End With

    ' Add a new menu
    ' Set NewMenu = NewMenuBar.Controls.Add _
    ' (Type:=msoControlPopup)
    ' NewMenu.Caption = "Sa&ve Reports"
    '
    ' ' Add a new menu item
    ' Set NewItem = NewMenu.Controls.Add(Type:=msoControlButton)
    ' With NewItem
    ' .Caption = "Export Standard Report"
    ' .OnAction = "Export_Standard_Monthly"
    ' End With



    ' Add a new menu
    Set NewMenu = NewMenuBar.Controls.Add _
    (Type:=msoControlPopup)
    NewMenu.Caption = "Admin"


    ' Add a new menu item
    Set NewItem = NewMenu.Controls.Add(Type:=msoControlButton)
    With NewItem
    .Caption = "&Restore Normal Menu"
    .OnAction = "DeleteMenuBar"
    End With

    ' Copy the File menu from Worksheet Menu Bar
    CommandBars("Worksheet Menu Bar").Controls(7).Copy _
    Bar:=CommandBars("DBMenubar")
    CommandBars("Worksheet Menu Bar").Controls(9).Copy _
    Bar:=CommandBars("DBMenubar")

    End Sub


  10. #10
    MrExcel MVP Ivan F Moala's Avatar
    Join Date
    Feb 2002
    Location
    Auckland, New Zealand
    Posts
    4,209
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Have you got the;

    Microsoft Office X.0 object Library

    Ticked ?? where X.0 is your version number
    eg Xl 2000 = 9.0

    Ivan

Some videos you may like

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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