You can accomplish these tasks using the common dialog control.
If the user opens a file, store the filename for use with the
Save command. If the user selects Save, but there is no filename
stored, call the SaveAs function instead.
Im not sure what you intended SaveChanges to do, it seems this would
be covered by using one of the other two save routines.
To determine if the text has changed, set a flag in the textbox change
event and clear it in the open or save routines. Before exiting, in
the QueryUnload event, test the flag and prompt the user if the changes
have not been saved.
You can use the Flag property of the dialog box to force a confirmation
prompt if the user selects a filename already in use:
cdlOFNOverwritePrompt ( = 2&)
Since these are common commands in most applications, you might put the
code in a module, or class, so that it can be easily ported to your other
programs.
LFS
Quote:
> Looking for some sample code for saving a couple of text box's to the hard
> drive. Including save, save as, open, overwrite?, and save changes?. Using
> VB4.
> ______________________________________________________