Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Default Filepath question... How to???
Hello all,
I am working in VB6.0 with the common dialog control and am trying to create some code that will allow me to create/set a default filepath. Here's what I want to do: 1) I want to bring up the common dialog control and allow the user to select a *FOLDER* (only a folder); 2) I then want to get the filepath to the selected *FOLDER* from the common dialog control, 3) I then want to close the common dialog control and store that *FOLDER* filepath in the windows registry. The problem is this: How do you get the filepath to the selected folder from the common dialog control *without* actually "opening or saving a file"??? It can't be this hard... What am I doing wrong?!?!? Thank you in advance, blc |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Default Filepath question... How to???
I tested the following code in an Excel Macro. After the first msgbox of
the folder, the dialog box opened, I moved to another foldere, clicked the Cancel button, and the second CurDir msgbox showed the revised directory. Hope this helps. Ron Dahl MsgBox CurDir TheName = Application.GetOpenFilename( _ filefilter:="Excel Files (*.xls), *.xls", _ Title:="Load File") MsgBox CurDir "blc" wrote in message ... Hello all, I am working in VB6.0 with the common dialog control and am trying to create some code that will allow me to create/set a default filepath. Here's what I want to do: 1) I want to bring up the common dialog control and allow the user to select a *FOLDER* (only a folder); 2) I then want to get the filepath to the selected *FOLDER* from the common dialog control, 3) I then want to close the common dialog control and store that *FOLDER* filepath in the windows registry. The problem is this: How do you get the filepath to the selected folder from the common dialog control *without* actually "opening or saving a file"??? It can't be this hard... What am I doing wrong?!?!? Thank you in advance, blc |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I set a default to add a filepath footer when printing? | Excel Discussion (Misc queries) | |||
Filepath | Excel Discussion (Misc queries) | |||
Filepath | Excel Discussion (Misc queries) | |||
get filename and filepath | Excel Programming | |||
Selecting File and FilePath | Excel Programming |