Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Request Directory From User - VBA Code

I am trying to find the VBA code to prompt the user for the directory
to save a file. The code will define the files name, I just need the
user to direct the program to the folder which the user would like the
file saved in. I have been searching all over the internet but cannot
find the write answer. Please help.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 380
Default Request Directory From User - VBA Code

Since XL2002 there is a browse dialog.
With Application.FileDialog(msoFileDialogFolderPicker)
.Show


MsgBox .SelectedItems(1)


End With


Look up FileDialog in the VBA help


--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

wrote in message
oups.com...
I am trying to find the VBA code to prompt the user for the directory
to save a file. The code will define the files name, I just need the
user to direct the program to the folder which the user would like the
file saved in. I have been searching all over the internet but cannot
find the write answer. Please help.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default Request Directory From User - VBA Code

If you need to support versions prior to XL2002, use the BrowseForFolder
API.
http://www.cpearson.com/excel/BrowseFolder.htm

NickHK

wrote in message
oups.com...
I am trying to find the VBA code to prompt the user for the directory
to save a file. The code will define the files name, I just need the
user to direct the program to the folder which the user would like the
file saved in. I have been searching all over the internet but cannot
find the write answer. Please help.



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 request user in input variable value within formula? R Nelson Excel Worksheet Functions 11 June 3rd 08 01:29 PM
Request for a code FARAZ QURESHI Excel Discussion (Misc queries) 0 January 27th 08 02:59 PM
prompt user to specify a directory mini Excel Programming 5 April 20th 06 06:05 AM
Code to raise Directory request box ANDYGM Excel Worksheet Functions 2 April 10th 06 11:47 AM
Knowledge gained from Access to Excel VBA Automation User request ImraneA Excel Programming 0 January 29th 04 04:35 PM


All times are GMT +1. The time now is 05:06 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"