Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can I set a default to add a filepath footer when printing? bearcat1 Excel Discussion (Misc queries) 0 August 3rd 06 09:21 PM
Filepath Marie-Jo Excel Discussion (Misc queries) 3 July 5th 05 07:56 PM
Filepath Marie-Jo Excel Discussion (Misc queries) 2 June 30th 05 11:06 PM
get filename and filepath Robert Ehrlich Excel Programming 3 December 21st 03 12:23 PM
Selecting File and FilePath Peter Harrison Excel Programming 2 November 7th 03 04:27 PM


All times are GMT +1. The time now is 06:56 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"