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

Help with evoking a File Dialog box

Status
Not open for further replies.

HoustonGuy

Programmer
Jun 29, 2000
165
US
I have written simple vbscript to evoke a file dialog box. It works on my Windows 98 development machine but not on any other 6 Windows 98 machines we have set up for testing.

The vbscript returns an error that the object cannot be created. I cannot find reference to it in the registry to check my ProgID.

Cmdial32.dll is in each sytem registry AND is a basic .dll for windows. Is this a simple matter of registering the .dll? How can this .dll NOT be registered and still allow the file dialog box to open for other programs?

Here is the sample code - you can't get any more basic than this....:)

<HTML>
<BODY BGCOLOR = &quot;white&quot;>
<FORM NAME = &quot;MyForm&quot;>
<INPUT TYPE=text NAME = &quot;myText&quot;>
<P>
<INPUT TYPE=button NAME = &quot;myButton&quot; VALUE=&quot;Evoke File Dialog Box&quot;>
<SCRIPT FOR=&quot;myButton&quot; EVENT=&quot;onClick&quot; LANGUAGE=&quot;vbscript&quot;>
dim cdl1
dim txtfile
set cdl1 = createobject(&quot;MSComDlg.CommonDialog&quot;)
cdl1.MaxFileSize = 10000
cdl1.showopen()
Myform.mytext.value = cdl1.filename

</SCRIPT>
</FORM>
</BODY>
</HTML>

Any help is appreciated. Cody ford
Data Mining, Cleansing and Reporting Specialist
codyjford@hotmail.com

SQL, VB6, Seagate Info/Crystal Reports

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top