[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

VBA - "Can't Find Project Or Library"

Posted on 2014-01-17
4
Medium Priority
?
400 Views
Last Modified: 2014-01-17
Hi,
I have some moderate knowledge of VBA - not great tho!

I am trying to fix something for a colleague.
At this moment, I cannot upload the sheet onto EE.

Someone send me a workbook.

When I try to compile to VBA I get "Can't find project or Library".

This line is the problem!
NM = MsgBox("Data has been clear", vbOKOnly, "New Month")

There appear to be no other reference in the VBA to "NM".



Sub NewMonth()
    Application.ScreenUpdating = False
    Sheet48.Select
    Range("GoTo1").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Range(Selection, Selection.End(xlToLeft)).Select
    Selection.PasteSpecial Paste:=xlPasteFormulas, Operation:=xlNone, _
        SkipBlanks:=False, Transpose:=False
    Range("A1").Select
    Sheet38.Select
    Range("EvaDailyData").Select
    Selection.ClearContents
    Range("A1").Select
    Sheet29.Select
    Application.ScreenUpdating = True
    NM = MsgBox("Data has been clear", vbOKOnly, "New Month")
End Sub
0
Comment
Question by:Patrick O'Dea
  • 2
4 Comments
 
LVL 28

Accepted Solution

by:
MacroShadow earned 2000 total points
ID: 39788200
Check for missing references. alternatively you can try VBA.MsgBox.
0
 

Author Closing Comment

by:Patrick O'Dea
ID: 39788282
Thanks ... I am closing this call as I have raised a similar (perhaps better) one.
0
 
LVL 43

Expert Comment

by:Saqib Husain, Syed
ID: 39788283
Go to

Tools > References

and look for a ticked item starting with "Missing:...."
0
 
LVL 28

Expert Comment

by:MacroShadow
ID: 39788354
Check for missing references.
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Excel can be a tricky bit of software to get your head around. Whilst you’ll be able to eventually get to grips with the basic understanding of how to get by, there are a few Excel tips that not everybody will even know about let alone know how to d…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question