?
Solved

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

Posted on 2013-11-12
2
Medium Priority
?
190 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 27

Accepted Solution

by:
MacroShadow earned 1200 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 800 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

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.
Microsoft has changed the look and feel of Azure AD and Microsoft account sign-in pages so that you will have a more unified look and feel when moving between the two interfaces.
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…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

719 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