MVP Challenge. Erratic Userform Compile Error

  • Thread starter Thread starter Seb
  • Start date Start date
S

Seb

Hi All-

Strange things going on round here. Asking for Theories and
Suggestions.

Situation:
Win98/Excel97 desktops running a custom VBA application.
The following issue occurs on one desktop only.

The custom app contains 20 userforms.
19 of the userforms compile without a problem.
1 of the userforms fails to compile because all of the objects
(labels, buttons, listboxes) disappear from the form.
Other forms retain the same object types.
References are the same when compared from one machine to the next.

Working Theory:
Could the reference to the MS Forms 2.0 object library be corrupted?
Would that result in the symptoms described above?

Other than reinstalling Excel97, are there other options to try?

Cheers,
Seb
 
Hi Seb

If you have the form intact in design mode, export it from the VB editor (rightclick it in
the VB explorer pane), close and import it into a blank workbook. See how it behaves
isolated.
 
Hi seb,

In addition to Harald's good advice its probably worth closing excel and
then deleting all the files in your temp folder
(Start-->Run-->%temp%)

Sometimes the temp files made by forms can get corrupted and cause problems.


Charles
______________________
Decision Models
FastExcel Version 2 now available.
www.DecisionModels.com/FxlV2WhatsNew.htm
 
Thanks guys! Excellent suggestions. I will try both when I regain
access to the troubled machine later tonight. Ah.. the lovely life of
IS support.

As an aside, I never would have thought the temp files could interfere.

Keeping my fingers crossed.

Cheers,
Seb
 
Alrighty, moving temp files to a new location did not work.
Trying to reimport the frm file revealed an interesting new error
message "Invalid Picture". Interestingly there is no picture on the
form. Sounds like a corrupted file to me.

Thoughts on how to proceed?

-Seb
 
Hi Seb

Try opening the frm file (not the frx file) in notepad. You might post that text here and
be lucky, some people can read and understand those things well.

Here's what I'd do, and it's probably not the easiest way:

Open the frm file in notepad or similar and save all the macro code as a text file for
later use.
Build a new form, make it look like your original. Rename its controls as they was
originally named.
Paste the copied macro code into it. Test and refine until it's good.

Remove the corrupte form from your original file. If it works, import your new form. If
not, export everything piece by piece and collect them into a brand new file.
 
When you cleared out the temp directory, did you delete files in
subdirectories below it like Excel7 and VBE (all *.exd files for sure) (do
this with Excel closed).
 
Gentlemen-

Thank you very much for all your advice.

The problem was fixed by rebuilding the userform from scratch. I
suspect the form was corrupted at some point during development.

Thank you.

Seb
 
Hi Seb

Such things just happen fromtime to time. Glad you fixed it. Thank you for the feedback.

Best wishes Harald
Followup to newsgroup only please.
 
Back
Top