944,200 Members | Top Members by Rank

Ad:
Dec 14th, 2004
0

Help with Browse

Expand Post »
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
Similar Threads
mex
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mex is offline Offline
5 posts
since Oct 2004
Dec 14th, 2004
0

Re: Help with Browse

it's not "If Not" it's ELSE

You don't exit a for loop?
Reputation Points: 38
Solved Threads: 9
Posting Whiz in Training
suRoot is offline Offline
210 posts
since Apr 2004
Dec 14th, 2004
0

Re: Help with Browse

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
Reputation Points: 38
Solved Threads: 9
Posting Whiz in Training
suRoot is offline Offline
210 posts
since Apr 2004
Dec 14th, 2004
0

Re: Help with Browse

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".
Reputation Points: 16
Solved Threads: 1
Posting Whiz in Training
mnemtsas is offline Offline
200 posts
since Jul 2004
Dec 15th, 2004
0

Re: Help with Browse

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.
mex
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mex is offline Offline
5 posts
since Oct 2004
Dec 19th, 2004
0

Re: Help with Browse

well.... isn't there anyone left!! to help me
mex
Reputation Points: 10
Solved Threads: 0
Newbie Poster
mex is offline Offline
5 posts
since Oct 2004
Dec 19th, 2004
0

Re: Help with Browse

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")
Reputation Points: 16
Solved Threads: 6
Posting Pro in Training
1o0oBhP is offline Offline
445 posts
since Dec 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: how to select folder using commondialog in visual basic
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: request for ansi sql queries equalent to MS access





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC