Hi All ,
I Want to popup a file dialog box thru VBScript , Can any one tell me how I can do that , I am new to Vbscript. Any help is welcomed.
Thx in advance
Anil.
dim cdl1
dim txtfile
set cdl1 = createobject("MSComDlg.CommonDialog"
cdl1.MaxFileSize = 10000 'filter files to lesser than 10k
cdl1.ShowOpen()
txtFile = cdl1.filename
msgbox txtfile 'will show selected file path
This one's been out here a while. I hope posting to it will bring it basck up to the top for someone to answer.
I've looked and looked for just this solution. Thanks so much. However, I get the error that states, "Class not licensed for use." How do I license the class. I would have thought that MS Common Dialogs are already licensed for use.
GetObject requires a COM object; The Windows CommonDialog is really not COM, its just a DLL, but there is a COM object thats a wrapper for CommonDialog.
I get the same error. In my Registry "MSComDlg.CommonDialog" refers to COMDLG16.OCX (& Comdlg32.ocx), which looks like a COM to me. (HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{F9043C85-F6F2-101A-A3C9-08002B2F49FB})
.. if thats any help
To get the license on each box, you have to install a relatively big development tool vb5 control editor which by itself is very useful. The main thing is that it comes as free utility.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.