Home
 | 
Programs
 | 
Tips & Tricks
 | 
Subs & Functions
 | 
Links
 | 
Laz's Liberty Basic Site
The lines that make this tip work are these two.
filedialog "Open a file",Path$,FileName$
if Path$ <> "" then Path$ = FileName$
Setting the Path$ to the return value of the filedialog function will ensure that the next time the file dialog function is called it will start in the last place that a file was opened. On the other hand, if the user cancels instead of opening a file then the next time the filedialog function is called then it will act the same as the first time.
If you have more than one place that you want to have the user open and/or save a file, or if you are going to use more than one filedialog command in a single program then you need to make shure that the variable name you use won't get changed somewhere else in the program name. You could use something like Open1$, or Browse1$.