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

Son

Active Member
Joined
Mar 19, 2010
Messages
284
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.
 
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!
 
Upvote 0

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
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
 
Upvote 0
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.
 
Upvote 0
Are you use in project RefEdit control? It often creates problems with breakages references.

Artik
 
Last edited:
Upvote 0
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.
 
Upvote 0
@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.
 
Upvote 0
Zack, but is not excluded. Time will show.
At our forum, at these problems, were almost always broken references.

Artik
 
Upvote 0
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. :)
 
Upvote 0
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.
 
Upvote 0
Calendar control is not available in version 2010.

Artik
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,489
Messages
6,113,953
Members
448,535
Latest member
alrossman

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top