Browse function

  • Thread starter Thread starter Bijl167
  • Start date Start date
B

Bijl167

Hi,

I have a macro which saves parts of the active excell file into anothe
(new) file. The location where this new file is saved is currently th
active path. Does any one know of a way to make this path flexible i.e
let the user select the path through a browse dialog (or something lik
that)

many thanks in advance!!
maarte
 
Maarten

You could show the user the save as dialog using the GetSaveAsFileName
Method

Dim sFileName As String
sFileName = Application.GetSaveAsFilename(FileFilter:="Microsoft Excel
Workbook, *.xls")

Then use the variable as the name of the file to save. (The method returns
false if the user cancels the dialog)

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
 
Back
Top