Excel 2010 does not recognize vba functions such as date and time, left etc

Son

Active Member
Joined
Mar 19, 2010
Messages
280
Hi, I have a workbook that has about 35 modules. The problem is that my wb is made in excel 2003, and works fine in excel 2007, but in excel 2010 I get the message of compile error in hidden module 1 etc. When I debug, I get error at the point that I have :

Code:
range("A1") = Dat
range("A2") = Time
range("A1") = left(range("A1"), 2)

The code breaks in various modules, some of which begin with "option explicit" and some do not. I have not been able to research the issue further because my wb is protected and I don't have excel 2010 in my pc, I can just try to use my colleagues' computer for a short while.

I would really appreciate any of your ideas on this because more and more of the users of the wb want to upgrade to excel 2010 and i'm afraid I will not be able to support this.
 

Son

Active Member
Joined
Mar 19, 2010
Messages
280
See if there are items that start with MISSING.
Artik

yes, i've thought of that too, but i haven't been able to test this yet. I'm very curious to see if I will find any items missing from the library of the xl2010 user. Thanks for your suggestion, I will let you know what I will find out!
 

Some videos you may like

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Artik

Board Regular
Joined
Jun 5, 2012
Messages
93
It may be that in project you have references to libraries that do not use the code. The libraries are on your computer and not on another.

Artik
 

Son

Active Member
Joined
Mar 19, 2010
Messages
280
the project that i develop, i send to about 20 different users and some of them have excel 2010 and they cannot open it and run the macros. So, that's why i need to check their computers for missing libraries.
 

Artik

Board Regular
Joined
Jun 5, 2012
Messages
93
Are you use in project RefEdit control? It often creates problems with breakages references.

Artik
 
Last edited:

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
75,831
Office Version
  1. 365
Platform
  1. Windows

ADVERTISEMENT

Son

Are you using any libraries other than the 'standard' Excel ones?

For example the Word library, or perhaps Outlook or if working with a database ADO/DAO libraries.
 

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
@Son: Basically the easiest way to tell the difference is if you type just the name of the function and hit your open paren, if you see a syntax it's part of the VBA library. Conversely if you type "WorksheetFunction" as soon as you hit the period (since it's parent object is Application) you'll see intellisense with a list of available methods/properties. Not all worksheet functions are part of this object though. And there are some VBA (library) functions which return different results than the worksheet functions. Like the Round() function in VBA does bankers rounding, whereas the worksheet function definitely does not do this.

@Artik: While good to check for (missing references) this particular problem isn't specific to that.
 

Artik

Board Regular
Joined
Jun 5, 2012
Messages
93

ADVERTISEMENT

Zack, but is not excluded. Time will show.
At our forum, at these problems, were almost always broken references.

Artik
 

Zack Barresse

MrExcel MVP
Joined
Dec 9, 2003
Messages
10,881
Office Version
  1. 365
  2. 2010
Platform
  1. Windows
  2. Mobile
  3. Web
Oh I'm not saying it won't happen under that condition, I'm saying it's not exclusive to it. You're very correct it's a good check, was just trying to clarify. :)
 

Son

Active Member
Joined
Mar 19, 2010
Messages
280
Are you using any libraries other than the 'standard' Excel ones? For example the Word library, or perhaps Outlook or if working with a database ADO/DAO libraries.

Norie, using the pc at home, with xl 2003, I can see that in the references section of my project, these are checked :
Visual Basic For Applications
Microsoft Excel 11.0 Object Library
OLE Automation
Microsoft Office 11.0 Object Library
Microsoft Forms 2.0 Object Library
Microsoft ActiveX Data Objects 2.8 Library
Microsoft Calendar Control 11.0
Microsoft Visual Basic for Applications Extensibility 5.3

By the way, the ref edit control is not checked.
 

Artik

Board Regular
Joined
Jun 5, 2012
Messages
93
Calendar control is not available in version 2010.

Artik
 
Last edited:

Watch MrExcel Video

Forum statistics

Threads
1,109,410
Messages
5,528,613
Members
409,828
Latest member
99DodgeRam

This Week's Hot Topics

  • Change military grades into rank
    Afternoon all Need help with formula that will change military rank (i.e. 1, 2, 3 into Amn, A1C, SrA). Running IF formula that does not work...
  • VBA COUNTIF SOLUTION
    Hi The following are the errors spread across the several columns from E to Q ie. 13 columns across several sheets with more than 500 rows per...
  • INSERT ROW WITH SPECIFIS TEXT IN A COLUMN
    Hi All! How can identify that that the row to be inserted has to be inserted before 1st row with specific text in column F. If I record the...
  • Auto-Create a monthly Sign in sheet for preschool students
    The image below is what each page looks like. Above is space for the "Child Name" "Month" "Class" School days are obviously Monday-Friday but...
  • VBA vlookup multiple results
    Hi folks, Hopefully someone out there can help. I have a list to vlookup which works (ish). the lookup only picks up the first instance of the...
  • Extract values for earliest/latest times
    I am trying to put together a formula to get the earliest start time, the latest end time from column A for each person in Column B-F without the...
Top