Solved

VBA - "Can't Find Project Or Library"

Posted on 2014-01-17
4
351 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 26

Accepted Solution

by:
MacroShadow earned 500 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 26

Expert Comment

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

Featured Post

What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

Join & Write a Comment

Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

706 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now