Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
using the OpenText File command, is there a way for the user using th
macro define the path & file name rather then it defaulting to the fil defined in the code. Here is the original code: Right now I have to have the user befor using the Excel file to define their data in this data.txt file. Whic is an extra step that if at all possible needs to be stream lined. Workbooks.OpenText FileName:="C:\Cutsheets\data.txt" Origin:=xlWindows, _StartRow:=1, DataType:=xlFixedWidth FieldInfo:=Array(0, 1) I appreciate any help in this. Thanks, Chri -- Message posted from http://www.ExcelForum.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You could use INputBox to ask the user for input, or even use the
GetOpenFileName method to allo0w the user to browse folders for a file. The latter just returns the file name, it doesn't open it. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "surveyorinva " wrote in message ... using the OpenText File command, is there a way for the user using the macro define the path & file name rather then it defaulting to the file defined in the code. Here is the original code: Right now I have to have the user before using the Excel file to define their data in this data.txt file. Which is an extra step that if at all possible needs to be stream lined. Workbooks.OpenText FileName:="C:\Cutsheets\data.txt", Origin:=xlWindows, _StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(0, 1) I appreciate any help in this. Thanks, Chris --- Message posted from http://www.ExcelForum.com/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User defined file name on save | Excel Discussion (Misc queries) | |||
Attaching Help File to a User Defined Function | Excel Discussion (Misc queries) | |||
can i save an existing .xls file as a .csv file using command line | Excel Discussion (Misc queries) | |||
Prompt user to select file with default file selected dialog | Excel Programming | |||
Using Workbooks.OpenText to read a tab-delimited file into a worksheet | Excel Programming |