Solved

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

Posted on 2013-11-12
2
172 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 27

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Microsoft Office Picture Manager is not included in Office 2013. This comes as a shock to users upgrading from earlier versions of Office, such as 2007 and 2010, where Picture Manager was included as a standard application. This article explains how…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
This video shows where to find the word count, how to display it, and what it breaks down to in Microsoft Word.
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…

770 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