Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Problem with File dialog box.

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,134
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Problem with File dialog box.
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Problem with File dialog box. - 6/7/2001 9:45:46 AM   
  rhl150

 

Posts: 29
Score: 0
Joined: 5/23/2001
From: New Zealand
Status: offline
I am using following code to display a file dialog box..

dim cdl1
dim txtfile
set cdl1 = createobject("MSComDlg.CommonDialog")
cdl1.showOpen
txtFile = cdl1.filename
msgbox txtfile

when I tried to run this code , it gives "The Common dialog
function failed during initialisation" error.
please help me to fix this problem.
 
 
Post #: 1
 
 Re: Problem with File dialog box. - 6/7/2001 9:53:17 AM   
  subnation

 

Posts: 20
Score: 0
Joined: 5/22/2001
From: USA
Status: offline
try to filter the files by setting the maxfile size:

dim cdl1
dim txtfile
set cdl1 = createobject("MSComDlg.CommonDialog")
cdl1.MaxFileSize = 10000 '(restricted to files lesser than 10k)
cdl1.ShowOpen()
txtFile = cdl1.filename
msgbox txtfile

(in reply to rhl150)
 
 
Post #: 2
 
 Re: Problem with File dialog box. - 6/7/2001 9:53:38 AM   
  subnation

 

Posts: 20
Score: 0
Joined: 5/22/2001
From: USA
Status: offline
Sorry the maxfile size gives the size of the cache file to store
filenames.. in KB.. 10000 = 10000Kb

(in reply to rhl150)
 
 
Post #: 3
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Problem with File dialog box. Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts