View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
BillyRogers BillyRogers is offline
external usenet poster
 
Posts: 78
Default set var to folder path using Open Dialogue box

I have a spreadsheet application that is hard coded to search a folder on our
network. With the click of a button, it loops through all the access
databases in this folder and performs record count queries on twelve tables
(with the same table names in each database-just the databases have different
names) and prints the database name, table and record count in excel. It
works great.

Now I would like the user to be able to click a button on the spreadsheet
and have the open dialogue box (or some other control where they can select
a FOLDER---NOT A FILE!!) pop up and have them select the folder and have
this path saved in a variable. Then i will insert the variable name where I
currently have the path hard coded. then they can click the start button as
usual.

I tried using Application.GetOpenFilename but that makes you select a file.
I need the user to be able to select a folder and I don't want the folder
opened. I just want the path saved in a variable and I'm not sure how to do
this.

Thanks


--
Billy Rogers

Dallas,TX

Currently Using Office 2000