Comdlg32.ocx

;

;-\)

I developed a Excel sheet on my home PC, XP pro, Office XP, VB 6 installed
too.

The sheet works fine on my system.

I have one user form that opens when opened. I use a reference to
comdlg32.ocx (MS Common Dialog Control Version 6.0) to allow me to have a
file selection tool.

On the client system (large Corp) Win 2K, Office 2000. I can't get it to
work. I even copied all parts over as text and recreated the Sheet. On the
client system, If I don't set the "References" first when I add this control
to the tool bar I get a control that is named "Unknown". If I set the
Reference first, then add to control, it looks fine. When I run it I get an
unlicensed control error.

I have also noticed that after fighting this problem the system as lost the
ability to open any of the older excel sheets.

SO can I use this OCX with out loading VB 6 on it? Is there a "legal"
control that does the same thing? Will I have to reload Office to fix the
functioning of the older sheets?
 
C

Clark

Wouldn't this open an excel sheet? I need to get a data file name.

Not necessrily. From the help file:

Example
This example displays the Open dialog box, with the file filter set to text
files. If the user chooses a file name, the code displays that file name in a
message box.

fileToOpen = Application _
.GetOpenFilename("Text Files (*.txt), *.txt")
If fileToOpen <> False Then
MsgBox "Open " & fileToOpen
End If

[snip]
 
T

Tom Ogilvy

Just for added clarity:

GetOpenFilename just returns the name (fully qualified with path) of the
file selected - it doesn't open it. The user can select any type of file.
(if multiselect is set to true, it returns an array of filenames selected by
the user).
 
T

Tom Ogilvy

When I run it I get an
unlicensed control error.


But he also said he has a license problem. this control apparenty requires
a redistribution license for it to run in Design time - think he needs to go
to the API directly if he must use the common dialogs controls.

Regards,
Tom Ogilvy
 
H

Harald Staff

Tom Ogilvy said:
But he also said he has a license problem. this control apparenty requires
a redistribution license for it to run in Design time - think he needs to go
to the API directly if he must use the common dialogs controls.

Ouch ! Yes, right. I've had that one with Comctl32.ocx, creating Watson errors, piracy
warnings and other fun things onto NT family computers. I removed the thing the thing
completely (it's a form statusbar) from all my work, made my own similar control instead,
and I have no idea what was/is wrong. One can't win those fights anyway.

Best wishes Harald
Excel MVP

Followup to newsgroup only please.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top