Common Dialog Box Not working Properly

harrisw

Registered User.
Local time
Today, 09:02
Joined
Mar 27, 2001
Messages
131
I've put a common dialog control on a form.

Can make it visible by using the .showopen statement.

I was under the impression that if I double clicked a file within it ie and xls spreadsheet it would open.

No nothing happens at all. Surely I don't need to code all the functionality of the dialog box.

If I highlight a file and click open the some thing happens it just sits there.

Anyone any ideas?
 
Code

Ok next thing then

What would be the code to put behind the open button on the common dialog box.
 
John,

Here is an example of how you can filter the files
Private sub mnuOpenFile()
'set filters
commondialog1.filter = "All Files (*.*)|*.*|text files (*.txt) |*.txt| batch files (*.bat)|*.bat"
'Set default filter
commondialog1.filterindex = 2
' display the open dialogbox window
commondialog1.showopen
' call the file open procedure
fileopen (commondialog1.filename)

You can set this to just show excel files, if you like. Then you can call the sub to open the file. Maybe someone else can help with this bit.

HTH

Rich
 
Last edited:
yes but its the fileopen procedure that i need...

If i put the code in it just says function not defined.
 

Users who are viewing this thread

Back
Top Bottom