View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Erik BZ[_2_] Erik BZ[_2_] is offline
external usenet poster
 
Posts: 2
Default Capturing a file path

Try this

Sub test()
With Application.FileDialog(msoFileDialogOpen)
.Show
MsgBox .SelectedItems(1)
End With
End Sub

Good Luck!
Erik BZ

"Daniel Bonallack" <Daniel wrote in
message ...
I want to perform a particular action the contents of a folder that the
user
chooses.

So I show the dialog box
Application.Dialogs(xlDialogOpen).Show

But how to I capture the folder they select to a string variable?

For example: sChosenFolder = "L:\ExcelFiles\Sept04\"

Thanks in advance

Daniel