commondialog 
Author Message
 commondialog

Dear all,

So far, I can only display the commondialog box for saving a file. How do I
refer to the process of user clicking OK button on dialog box? Thanks in
advance.



Sun, 07 Oct 2001 03:00:00 GMT  
 commondialog
Hail!

You cant actually refer or trap OK button of commondialog (usuall manner),
but
your Event stops when you display the dialog.
After that when user selects a file, it will return name of the file, user
have chosen
As CommonDialog.FileName Property, which you can use for saving the file.

Hope that helps,
Aikka


Quote:
> Dear all,

> So far, I can only display the commondialog box for saving a file. How do
I
> refer to the process of user clicking OK button on dialog box? Thanks in
> advance.



Sun, 07 Oct 2001 03:00:00 GMT  
 commondialog
Thanks for your help Jari.

I have another problem with CommonDialog(Save).

After I select the directory and enter file name and click okay, I assign
the file name to variable like this:

m_file = commondialog1.filename

How can I seperate the directory and file name? I can't use left$ or mid$ as
the length of directory name could be vary so could be the file name.

Thanks in advance for your help.



Mon, 08 Oct 2001 03:00:00 GMT  
 commondialog
Hello!
Maybe this is for some use
*****************************************************
Dim sDir$
cd.ShowOpen ' CD is the name of commondialog in this example
sDir = Left(cd.FileName, Len(cd.FileName) - Len(cd.FileTitle))
MsgBox "FileName is: " & cd.FileTitle & " - Directory is: " & sDir
*****************************************************

Hope that helps,
Aikka


Quote:
> Thanks for your help Jari.

> I have another problem with CommonDialog(Save).

> After I select the directory and enter file name and click okay, I assign
> the file name to variable like this:

> m_file = commondialog1.filename

> How can I seperate the directory and file name? I can't use left$ or mid$
as
> the length of directory name could be vary so could be the file name.

> Thanks in advance for your help.



Mon, 08 Oct 2001 03:00:00 GMT  
 commondialog
Thanks Jari.


Mon, 08 Oct 2001 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Urgent: Help on CommonDialog in VBA in Access

2. Problem with CommonDialog

3. Open CommonDialog Box in Access

4. CommonDialog ShowOpen Problem

5. commonDialog control

6. = CommonDialog of vb !!

7. commonDialog / comdlg32.dll / saving .msg to hard drive

8. Error 800a0011 - CommonDialog 60 on Excel user form

9. CommonDialog Control

10. CommonDialog in PowerPoint

11. Commondialog problem

12. CommonDialog error, regarding a license problem

 

 
Powered by phpBB® Forum Software