>I want to store a variable in a text box on a form as in a default path and have the user change it to a chosen path. I want to use this chosen path to set a default path and run some code. I would appreciate some ideas on this.
Look at the FAQ entry I posted earlier that describes using the Shell automation object to replace the GETDIR() function in VFP. The automation object uses the explorrer browser for directory selection and provides access to an edit box connected to the explorer browser if the appropriate BROWSEINFO flags are set (the revised version enables the edit box by setting the BIF_EDITBOX flag in the method call.) The SelDirDlg returns a path (or an empty string if no path is selected) without a trailing backslash; you could use the returned path in conjunction with SET DEFAULT TO.
You can expand the dialog to allow file selection by setting the BIF_BROWESEINCLUDEFILES flag in the third parameter of the Shell object's BrowseForFolder method invocation. The default flags set are BIF_RETURNONLYFSDIRS (blocks access to non-file system references), BIF_EDITBOX (provides an edit box in the dialog for the user to manually enter a path) and BIF_VALIDATE (require a valid path or cancellation of the dialog) if no value is passed in the third parameter of the function call.