Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you. I'll let you know how it goes.
-- Suz "bpeltzer" wrote: I'd do this in two steps. First, record the opening of a specific file. Then edit the resulting VBA code, replacing the Filename:= parameter to incorporate the variables provided by the user. You'll probably use the & operator to combine some fixed components with some variables along with the format operator to turn the input date into the appropriate file name, something like Filename := "S:\" & CompanyName & "\" & DivisionName & "\" & text(Date,"mmddyy") & ".txt" Along the way you can also use the immediate window in the VB Editor; type the work print followed by the right-hand side of the equation above to see that you get the expected path and filename. --Bruce "Suzseb" wrote: I am trying to set up a macro to import a specific text file based on the information the user puts into specific cells. They imput the company, division and date and this generates a path & filename in a cell in the spreadsheet. How can I get that path & filename into the macro? I've tried quite a few options but with no success. Thanks, -- Suz |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Can I import text file of cash flow to excel file then use formula | Excel Discussion (Misc queries) | |||
Would Like to Automate Batch File Creation and Text FIle Import | Excel Discussion (Misc queries) | |||
How do I import text file, analyze data, export results, open next file | Excel Programming | |||
Import text file into excel with preset file layout, delimeters VBA | Excel Programming | |||
Get External Data, Import Text File, File name problem | Excel Programming |