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

Common Dialog Poblems comdlg16.ocx 1

Status
Not open for further replies.

ssVBAdev

Programmer
May 23, 2003
257
0
0
US
I'm having a problem with an Excel VBA project I've developed. I am using the Microsoft Common Dialog Control (which it tells me is in the comdlg16.ocx file).

A user whom I sent the .xls file to does not have the comdlg16.ocx file on their machine. I tried to simply copy the file from my machine to theirs and this did not work. I'm guessing the file needs to be registered but running regsrv32.exe to register the file gives an error saying that it is not an executable and that no regiestration help is available.

We are using the same operating system (windows 2000 pro) and same version of Microsoft Excel (2000).

Any thoughts!??!?
 
The project is not a Visual Basic Project. I have VB6 and would like to make the .xls macro into an Excel Add-in at some point but for right now it's just a (albiet quite complicated) macro or Visual Basic for Applications (VBA) project.
I feel my problem has more to do with Windows and/or the .ocx file and why Windows cannot "see" the file.
 
Is there a particular reason why you are using comdlg16 instead of comdlg32? comdlg16 is the 16 bit version and comdlg32 is the 32 bit version. Check and see if the user has comdlg32 and if so change your project to comdlg32.
hope this helps,

Sam
 
Well, the only reason that have to suspect the comdlg16 is that when I go to Tools-References... in the VBA IDE and click on the "Microsoft Common Dialog Control" (which is checked indicating that it is a reference in this project", the location, as shown at the bottom of the dialog box, says: "C\WINNT\systems32\comdlg16.ocx".
This is the only method that I am aware of that I can use the common "save" and "open" dialogs to allow the user to access external files.
 
comdlg32 will perform the same functions. It's just the 32 bit version of the control. I believe the 16 bit version is just there for legacy applications. I have both comdlg16 and comdlg32 on my PC. I can't say for certain how they got there since I have Office 97 pro and Visual Studio 6 installed on my PC. It is also possible they are installed by the OS as well. When you have both a 16 bit and a 32 bit version of a control available, it is advisable to use the 32 bit version in your apps as it will be more efficient(in theory). search your and your user's WINNT\system and WINNT\system32 dir's for comdlg32.

Sam
 
I know that I physically have the files on my computer. But, If I did want to use the 32 bit .ocx how do I find that in the list of references? The only options that I see in the list for common dialogs is the "Microsoft Common Dialog Control" and this located in the 16.ocx file. If I want to use the Common Dialogs in the 32 bit files, how do I get to them in the references?
 
Good Call,jhenager. I misse dthat point completely!

Sam
 
If the 32 bit version isn't listed, click on the browse button and navigate to comdlg32.

Sam
 
That's what I was looking for! All is right in the world again :eek:) Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top