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

Compile errors in XP (Word 2000) 1

Status
Not open for further replies.

michaelbr55

Programmer
Oct 8, 2002
70
I have created a group of macros and run then sucessfully on 4 machines
Win 95, Win 98, Win 2000 and Win XP using word 97, 2000 & 2002 but some users claim that the macros cause compile errors and halt execution.
eg "compile error in hidden form"
& "could not load object, not available on this machine"
The macros use MS Forms 2.0 and CommonDialog 6 but one XP user claims he has these files in his system32 folder.
Another user has Win 98 and Word 2000, exactly the same as the system I used to create them but still they don't work.
Anyone got any ideas?

 
The compile error in hidden form: means it crashed and you can't see where the error occured cause the form's been hidden. I've gotten this message when the VBA projects was pw protected.

I've had some issues writing code being used across a myriad of machines, and if you are lazy like me and use the macro recorder to help determine/identify code or jsut in general code very explicitly the problem is the VBA in 2000 has some updgrades and syntax changed so if you use some stuff the code might need to be written so that it can recognize what office you are running. For instance if you use Ofc 2002 to write code like to find/replace or merge and do a lot of formatting, you might be entereing a LOT of extraneous code that:
1. is irrelevant to your program
2. isn't compatible with previous versions of Ofc packaged.
3. Try reviewing some code and trimming down stuff which isn't critically necessary.

Specifically what objects are you loading? These questions are difficult to address without code?
Hope these help.
 
Michael,

I hope this hasn't happened to you, but I have seen some programs install with different versions of run time DLL's than was originally intended (all MFC, and MSVCRT) and this can have disastrous effects.

Check to see what versions of the DLL's are present, and what they're supposed to be

HTH ;P
 
Thanks for your help guys, as you suggested it was a problem with different version of dll's specifically the Common Dialog Control.

I know that the error was on a password protected form and couldn't be viewed, but it wasn't happening on my machines and I wasn't going to give the user the password and I didn't think you would want to wade through 50 pages of code.

I removed the common dialog control and all is well.

The lesson to be learnt here is, as I have seen in many other posts, DON'T USE COMMON DIALOG CONTROL, THERE IS NOTHING TO BE SEEN HERE!
 
This happens - that's funny THIS is an anagram of something else.

The dialog control is only one potential target for venting your anger at - imagine you're on a joint project with other vendors, and they're using different versions of dll's all over the place - then the currency exchange opens with some of the finest buck passing I've ever witnessed.

What you could do is look at some packaging program that will alert if dll versions are different.

HTH
Paul
 
I have had the same dll issue. Does anyone know how to check a dll version? Obviously, you can add a reference through Reference.AddFromFile, but I can't figure out how to determine the dll version programatically.

Thanks for the help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top