ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Browse function (https://www.excelbanter.com/excel-programming/286752-browse-function.html)

Bijl167[_10_]

Browse function
 
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

--
Message posted from http://www.ExcelForum.com


Nick Hodge

Browse function
 
Maarten

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

Dim sFileName As String
sFileName = Application.GetSaveAsFilename(FileFilter:="Microso ft 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
HIS


"Bijl167 " wrote in message
...
Hi,

I have a macro which saves parts of the active excell file into another
(new) file. The location where this new file is saved is currently the
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 like
that)

many thanks in advance!!
maarten


---
Message posted from
http://www.ExcelForum.com/




Bijl167[_11_]

Browse function
 
thanks!


---
Message posted from http://www.ExcelForum.com/



All times are GMT +1. The time now is 12:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com