|
-
Nov 6th, 2006, 09:43 AM
#1
Thread Starter
New Member
last saved file path
In vb 6.0, how do I get a directly list box to display the last opened/saved file path. Any help is appreciated.
-
Nov 6th, 2006, 09:45 AM
#2
Frenzied Member
Re: last saved file path
You need to store the filename somewhere in a variable whenever you open/save a file.
VB Code:
Dim LastFileName As String
Sub OpenFile(FileName As String)
LastFileName = FileName
' code to open file
End Sub
Sub SaveFile(FileName As String)
LastFileName = FileName
' code to save file
End Sub
-
Nov 6th, 2006, 09:47 AM
#3
Thread Starter
New Member
Re: last saved file path
Thanks.. but I want it to remember after you close and reopen the program. I guess you would have to save it in an external file...
(oops i guess ur code does do that :P)
Last edited by thiheep; Nov 6th, 2006 at 09:54 AM.
-
Nov 6th, 2006, 09:49 AM
#4
Re: last saved file path
Or simply store it in the registry using the savesetting function
__________________
________________0îîî___
___îîî0________(___)____
__(___)_________) _/_____
___\_ (_________(_/______
____\_)_________________
-
Nov 6th, 2006, 09:49 AM
#5
Frenzied Member
Re: last saved file path
What kind of an alternative do you want?
What should it do that my example doesn't?
-
Nov 6th, 2006, 09:52 AM
#6
Thread Starter
New Member
Re: last saved file path
how would i save it in the registry?? (I donno how)
-
Nov 6th, 2006, 10:00 AM
#7
Re: last saved file path
I don't have vb here.Heres how to do
Type savesetting then hit space and it will show you the arguments.Use getsetting to retrieve the values
__________________
________________0îîî___
___îîî0________(___)____
__(___)_________) _/_____
___\_ (_________(_/______
____\_)_________________
-
Nov 6th, 2006, 11:06 AM
#8
Thread Starter
New Member
Re: last saved file path
Thanks guys. It worked :P
VB Code:
Call SaveSetting(App.EXEName, "SaveLastPath", "Open", dlstbox.path)
VB Code:
dlstbox.path = GetSetting(App.EXEName, "SaveLastPath", "Open", "")
-
Nov 6th, 2006, 01:52 PM
#9
Re: last saved file path
Mark your thread as resolved then and rate the posts you found useful if any
__________________
________________0îîî___
___îîî0________(___)____
__(___)_________) _/_____
___\_ (_________(_/______
____\_)_________________
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|