Help with Browse

Reply

Join Date: Oct 2004
Posts: 5
Reputation: mex is an unknown quantity at this point 
Solved Threads: 0
mex mex is offline Offline
Newbie Poster

Help with Browse

 
0
  #1
Dec 14th, 2004
I download a program located at ftp://ftp.softcircuits.com/vbsrc/browse.zip and being a newbie, i failed to make the code work. i mean to make my code work with yoursit... the code is given below:

Private Sub Command1_Click()

Dim myfile
Dim i As Integer

For i = 1 To 999
myfile = Dir("C:\" & i & ".bmp")
If Not myfile = i & ".bmp" Then
fSaveGuiToFile ("C:\" & i & ".bmp")
Exit For
End If
Next i

End Sub
I would like the user to choose the path like the one at ftp://ftp.softcircuits.com/vbsrc/browse.zip but failed to integrate this code of mine to work with it... could you please help me out. thanx
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 210
Reputation: suRoot is an unknown quantity at this point 
Solved Threads: 8
suRoot's Avatar
suRoot suRoot is offline Offline
Posting Whiz in Training

Re: Help with Browse

 
0
  #2
Dec 14th, 2004
it's not "If Not" it's ELSE

You don't exit a for loop?
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 210
Reputation: suRoot is an unknown quantity at this point 
Solved Threads: 8
suRoot's Avatar
suRoot suRoot is offline Offline
Posting Whiz in Training

Re: Help with Browse

 
0
  #3
Dec 14th, 2004
it's probably best to put it into a sub ie


sub loop()
Dim myfile
Dim i As Integer


For i = 1 To 999
myfile = Dir("C:\" & i & ".bmp")
ELSE myfile = i & ".bmp" Then
fSaveGuiToFile ("C:\" & i & ".bmp")
End If
Next i
End Sub
Reply With Quote Quick reply to this message  
Join Date: Jul 2004
Posts: 200
Reputation: mnemtsas is an unknown quantity at this point 
Solved Threads: 1
mnemtsas's Avatar
mnemtsas mnemtsas is offline Offline
Junior Poster

Re: Help with Browse

 
0
  #4
Dec 14th, 2004
fSaveGuiToFile

This function is not defined in the code anywhere.

By the way suRoot

If Not myfile = i & ".bmp" Then

is perfectly legitimate code. It's saying if filename myfile is not equal to i & ".bmp".
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 5
Reputation: mex is an unknown quantity at this point 
Solved Threads: 0
mex mex is offline Offline
Newbie Poster

Re: Help with Browse

 
0
  #5
Dec 15th, 2004
the code available for download is actually a script which allows user to choose the file location and shows the location in a text box! and my script which i posted is actually a part of my code which saves to C:\ when "command1" is pressed.

I would like to make it in such a way that it saves to the location specified by the user and not to C:\ which cannot be changed by the user! hope u understand.

thanx! hope to get the help from u again.
Reply With Quote Quick reply to this message  
Join Date: Oct 2004
Posts: 5
Reputation: mex is an unknown quantity at this point 
Solved Threads: 0
mex mex is offline Offline
Newbie Poster

Re: Help with Browse

 
0
  #6
Dec 19th, 2004
well.... isn't there anyone left!! to help me
Reply With Quote Quick reply to this message  
Join Date: Dec 2004
Posts: 445
Reputation: 1o0oBhP is an unknown quantity at this point 
Solved Threads: 6
1o0oBhP's Avatar
1o0oBhP 1o0oBhP is offline Offline
Posting Pro in Training

Re: Help with Browse

 
0
  #7
Dec 19th, 2004
not thought about using a common dialog control? aka CMDIALOG. If you want the user to specify something what about the inputbox function ie

Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. Dim response
  2. response = InputBox("Enter filename")
http://sales.carina-e.com

no www
no nonsense

coming soon to a pc near you! :cool:
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC