Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Runtime Error 31037 "Error while file is loaded"

Posted on 1998-05-27
13
Medium Priority
?
2,927 Views
Last Modified: 2008-02-01
I did a system and a tried to install it in a commputer that doesn't have Visual Basic. When I try to read a file with
the Common Dialog this error appears (Error 31037 "Error while file is loaded"). The program works fine on  some other
machines, I don't know what is happening. Could it be that the resident machine has a 486 processor and the development machine and the others have a pentium processor?
I work with three common dialogs in differents parts of the system. In one part the common dialog open my file fine. In other menu option of the program I used another common dialog an it couldn't open the same file.
I hope you can answer my question.
Pepe
Thank you
I am using VB 4. The machine where the problem rise use Windows 95. The versions of the common dialog I use are comdlg32.ocx (Common Dialog Custom ActiveX Control Version 5.0)
I am not adding extra controls. I am using the normal common dialog.
I expect your answer.
Pepe
0
Comment
Question by:al361345
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
13 Comments
 

Author Comment

by:al361345
ID: 1461838
Edited text of question
0
 

Expert Comment

by:cmoore23
ID: 1461839
Some questions for you that may help in diagnosing your common malady.....

Are you talking Visual Basic 3, 4 or 5?
Are your machines using Windows3.1, 3.12 or Windows95?
Are you using cmdialog.vbx, commdlg.dll?  What versions?
Are you using comdlg32.ocs, comdlg32.dll?  What versions?

If you run your application and invoke the 'working' common dialog then re-run the application and invoke the 'non-working' common dialog, what happens? (Both work? Both fail? one fails, one works?)


Are both 'parts' of your application in the same .EXE file?

Are you doing anything *special* such as adding extra/custom buttons to the dialog box etc that are not achieved via the standard common dialog interface?  

If you can answer some of these it will help.

Chris.
0
 

Author Comment

by:al361345
ID: 1461840
Edited text of question
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:al361345
ID: 1461841
Edited text of question
0
 

Expert Comment

by:cmoore23
ID: 1461842
'Runtime Error 31037 "Error while file is loaded' can frequently
occur when a number of DLLs have conflicting versions.  That is
my first guess.

On the computer where you created your program, start EXPLORER and :

1) RIGHT CLICK on the file C:\WINDOWS\SYSTEM\COMDLG32.OCX. Then select PROPERTIES from the popup menu and click the VERSION tab. Write down the version number.

2) RIGHT CLICK on the file C:\WINDOWS\SYSTEM\COMDLG32.DLL.  Then select PROPERTIES from the popup menu and click the VERSION tab. Write down the version number.

THEN:

On the computer where your program errors, start EXPLORER and :
3) RIGHT CLICK on the file C:\WINDOWS\SYSTEM\COMDLG32.OCX.  Then select PROPERTIES from the popup menu and click the VERSION tab. Write down the version number.
4) RIGHT CLICK on the file C:\WINDOWS\SYSTEM\COMDLG32.DLL.  Then select PROPERTIES from the popup menu and click the VERSION tab. Write down the version number.

Update your question to include the versions of all these files.

Also, can you tell me how you distribute your program to the other computer.  Do you just copy the .EXE file or do you use the Visual Basic Setup Kit?


0
 
LVL 1

Expert Comment

by:web_crusher
ID: 1461843
copy the vb4 commondialog that you're using to your \winsys\ directory
then it will work fine - dont forget to update the comdlg32.ocx - you can find it anywhere in the net - or on http://www.nonags.com - under missing files options!
0
 

Author Comment

by:al361345
ID: 1461844
Thank you web_crusher. I did what you told me and it didn't work. I expect more coments from you.
0
 

Author Comment

by:al361345
ID: 1461845
Adjusted points to 200
0
 

Author Comment

by:al361345
ID: 1461846
I use the setup kit to distribute my program. It worked fine only once, but after that I started to have problems.
0
 

Accepted Solution

by:
cmoore23 earned 400 total points
ID: 1461847
Pepe, try this:

First copy COMDLG32.DLL from your 'working' machine to the 'not working' machine.

Then copy COMDLG32.OCX from your 'working' machine to the 'not working' machine.

Then TEST your program.

If it still does not work, REJECT my answer and I will try again to help you.




0
 

Author Comment

by:al361345
ID: 1461848
Thank you, cmoore23, It worked. Sorry I hadn't time to verify the answer until now.
Thank you again.

361345
0
 

Expert Comment

by:cmoore23
ID: 1461849
Pleased to be of assistance  :)

0
 
LVL 13

Expert Comment

by:Mirkwood
ID: 1461850
Bought This Question.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question