![]() |
Opening a browse and load file box in a macro
Currently I have a macro that uses the following line to load a file.
FileName = InputBox("Please enter the Text File's name, e.g. test.txt") What I want is to change this so it has the standard file load box that includes the "browse" button and the click on file to choose, etc. The files I am loading with this macro are down a few folders and trying to get the target path is a pain when I have to type in the whole path. -- Message posted via http://www.officekb.com |
Opening a browse and load file box in a macro
Take a look at GetOpenFilename in help, it is all there.
-- HTH RP (remove nothere from the email address if mailing direct) "Scott Calkins via OfficeKB.com" wrote in message ... Currently I have a macro that uses the following line to load a file. FileName = InputBox("Please enter the Text File's name, e.g. test.txt") What I want is to change this so it has the standard file load box that includes the "browse" button and the click on file to choose, etc. The files I am loading with this macro are down a few folders and trying to get the target path is a pain when I have to type in the whole path. -- Message posted via http://www.officekb.com |
Opening a browse and load file box in a macro
Hi Scott have a look @ the getopenFilename function. eg FileToOpen = Application.GetOpenFilename Look in the help files for the properties. -- Ivan F Moala ------------------------------------------------------------------------ Ivan F Moala's Profile: http://www.excelforum.com/member.php...fo&userid=1954 View this thread: http://www.excelforum.com/showthread...hreadid=374079 |
All times are GMT +1. The time now is 07:35 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com