Solved

Problems running macros due to migration from Windows XP Excel 2007 to Windows 7 Enterprise Excel 2010

Posted on 2013-11-12
2
170 Views
Last Modified: 2013-11-12
Hello,

I am trying to run the following code but get a compile error stating that a project or library cannot be found.

If Left(Sheets("OIS_FIX_CAS_ASIA").Range("P8").Value, 9) <> "UserCurve" Then
        MsgBox "Please check OIS_FIX_CAS_ASIA curve", vbOKOnly + vbCritical, "CURVE CHECK!"
        End
End If

The highlighted problem appears to be "Left".

Thanks.
0
Comment
Question by:f19l
2 Comments
 
LVL 26

Accepted Solution

by:
MacroShadow earned 300 total points
ID: 39641500
This behavior has been known in cases where there are missing references. Use the VBE menu Tools > References and deselect any references prefixed by "MISSING"
0
 
LVL 18

Assisted Solution

by:Steven Harris
Steven Harris earned 200 total points
ID: 39641510
Your syntax is correct.

I am trying to run the following code but get a compile error stating that a project or library cannot be found.

There is your issue.  What items do you show checked under Tools > References?  Do any of the objects say MISSING?

You should have standard items similar to:

-Visual Basic For Applications
-Microsoft Excel Object Library
-OLE Automation

You can also try the following:

If VBA.Left(Sheets("OIS_FIX_CAS_ASIA").Range("P8").Value, 9) <> "UserCurve" Then
        MsgBox "Please check OIS_FIX_CAS_ASIA curve", vbOKOnly + vbCritical, "CURVE CHECK!"
        End
End If

Open in new window

0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
No matter the version of Windows you are using, you may have some problems with Windows Search running too slow or possibly not running at all. Before jumping into how you can solve this issue, just know there are many other viable alternative deskt…
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…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …

707 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

18 Experts available now in Live!

Get 1:1 Help Now