ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   MVP Challenge. Erratic Userform Compile Error (https://www.excelbanter.com/excel-programming/285670-mvp-challenge-erratic-userform-compile-error.html)

Seb[_3_]

MVP Challenge. Erratic Userform Compile Error
 
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

Harald Staff

MVP Challenge. Erratic Userform Compile Error
 
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.

--
HTH. Best wishes Harald
Followup to newsgroup only please.

"Seb" wrote in message
om...
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




Charles Williams

MVP Challenge. Erratic Userform Compile Error
 
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

"Harald Staff" wrote in message
...
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.

--
HTH. Best wishes Harald
Followup to newsgroup only please.

"Seb" wrote in message
om...
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






Seb Koster

MVP Challenge. Erratic Userform Compile Error
 

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


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Seb Koster

MVP Challenge. Erratic Userform Compile Error
 

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


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Harald Staff

MVP Challenge. Erratic Userform Compile Error
 
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.

--
HTH. Best wishes Harald
Followup to newsgroup only please.

"Seb Koster" wrote in message
...

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


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




Tom Ogilvy

MVP Challenge. Erratic Userform Compile Error
 
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).

--
Regards,
Tom Ogilvy



"Seb Koster" wrote in message
...

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


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




Dubya

MVP Challenge. Erratic Userform Compile Error
 
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

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!

Harald Staff

MVP Challenge. Erratic Userform Compile Error
 
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.

"Dubya" wrote in message
...
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






All times are GMT +1. The time now is 07:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com