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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Libraries ("Trim" & "Str") Functions

Status
Not open for further replies.

burritonator

IS-IT--Management
Jun 15, 2004
133
US
I just copied some older VBA modules written by another programmer onto a WinNT box. These modules act as macros and are accessed by using certain keystrokes within MS Word. I'm receiving some errors that I need some assistance with.

* Word error: "Could not open Macro Storage"

* VB error: "Can't find project or library" --> When this error occurs, execution stops at either the "Trim" or "Str" function in the code. I can't remember how to load the library required for these functions to work properly.

If someone can tell me how to correct the errors above, it would be greatly appreciated.

Thanks,
Burrito
 
Alt+f11 to get to vba editor...
then Tools>Refrences from the menu.
 
Thanks for the info. It allowed me to find what I was looking for, and I now have some additional questions.

On the references window under "Available References", one of the References that the Project needs shows up as follows: "MISSING: Microsoft Common Dialog Control 5.0 (SP2)". The path given for this file is "C:\Windows\System\Comdlg32.ocx".

Of course, the given path isn't valid on the machine in question, since it is running NT and the Windows directory is "C:\winnt". I was able to work around the error by creating a "C:\Windows\System" folder on the NT box and copying the Comdlg32.ocx file from a Windows 95 box (yes, there is still one running here) into that folder.

However, I wasn't certain if the above work around was the best way to go about solving the problem, or if it could introduce other unexpected side effects. I assume that the "SP2" referred to in "Microsoft Common Dialog Control 5.0 (SP2)" is SP2 for Visual Basic - the problem is, the version of VBA on this machine is apparently so old that the Service Packs for it aren't even available on microsoft.com any more (or if they are, I can't find them).

I'm actually having a bit of trouble figuring out what version of VBA is on the machine - the "About" box simply says "Microsoft Visual Basic" with no version information at all. The Copyright Dates are 1987-1996 (the system is running Office97). Is this VB5, or something prior? Is there anywhere that I can still download the Service Packs?

Thanks,
Burrito



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top