Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What dll is the UCase function (for Excel) located in?

Status
Not open for further replies.

bdbBear

Programmer
Apr 29, 2005
54
US
I have an excel file (XP) that when I try to compile on another user's computer stops at lines using the UCase function.

When I look at the list of selected References, all of them match what I have.

Perhaps the problem is that the particular dll file is corrupted. However, I don't know which one it would be.

I have the following references checked:

- Visual Basic fo Applications
- Microsoft Excel 11.0 Object Library
- OLE Automation
- Microsoft Office 11.0 Object Library
- Microsoft Forms 2.0 Object Library

Thanks,

- Bruce
 
Check the object browser, Visual Basic for Applications (VBA) is the only library with a [tt]UCase()[/tt] function.

(GMT-07:00) Mountain Time (US & Canada)
 
I had something similar,it turned out to be a mismatch by by the References... functionality: in my case, the function UCase() was being used by a recordset object of ActiveX Data Objects library, or DAO Object library, I don't recall which. The app worked fine under Windows NT at first, but migrating to Win XP gave probelms: VB References got confused about the versions connected to the full reference name.

The references window was still using the same full name, but due to version issues for library files when installing Windows XP or Office XP, the actual path or file name that particular reference was referring to, did not exist anymore, or had changed at least. (Perhaps it has something to do with the registry.)

So you might check the full names behind "Path:" in the frame at the bottom of the References window, for every reference & compare with situation on other computer. Or, if no differences are found, look up the actual file in Win explorer and right-click Properties to compare the versions of the library file.

If all this fails, in References, try using a newer (or any different?) version for the library containing the object/method that is calling UCase(). Luck2U!
 
The same occurred again only this afternoon, I have some additional info: my case it was an Access 97 app developed on Win NT, now running on WinXP, with Access XP. On one XP machine this worked fine and on another it didn't.

I'm almost sure this had something to do with faulty installation of either Win XP or Office XP. This is how I solved it:

I opened references, there was one selected reference called "Microsoft ActiveX Data Objects 2.8 Library". Then I un-checked it, closed the References Window, and then opened it again. To my surprise, the library name had completely vanished from the References list! Normally it should still be among the un-checked items in the list. I then checked the newest version available, which in my case was version 2.7. This solved the problem.

Remarks:
1. The odd thing was, I got also an error message when using UCase() in a query running it directly from the Query Collection, so not even running this through VB code...
2. The query collection doesn't even use ActiveX Data Obj (or ADODB) library, or does it?
3. Function UCase doesn't even reside in the ADODB library.

Possible explanation: installing XP probably didn't install ADODB library version 2.8, where it should have, and installing XP (Windows or Office) causes Access to interpret the ADODB item in the References list as belonging to version 2.8...

Conclusion: be aware that one lost library reference may cause Access - and maybe in your case Excel as well - to get confused about its library resources altogether, resulting in error messages that may show no relation with the library file that causes the problem in the first place.

So write down all selected library files, uncheck as much of them as possible (unchecking VB for Apps is prob not allowed), close References, open again and select latest versions you can still find in the list. Hope this helps.

(Gee, thanks Microsoft! Not.)
 
Ahh, makes me love MS so much I think I'll pack my bags and move to Redmond ;-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top