Solved

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

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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …

738 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