Help with TransferText

  • Thread starter Thread starter sarahlynne
  • Start date Start date
S

sarahlynne

Guest
Hi all,

I have a macro in Access that transfers a delimited text file into a table using the Transfer Text action.

Is it possible for me to specify in this macro a variable name as the File Name? rather than an actual path, since I want this to depend upon what file the user has selected.

Alternatively, could somebody tell me how to hard code the Transfer Text action in VBA so that I can specify the path as a variable?

Many thanks in advance
 
Write a function for user to select a path in a module then call that function in the File Name. For example:
Let's say you create a function call FilePath that return the path as the string
Function FilePath() as string
---your code here
End Function

Then put =FilePath() in the File Name of macro
 

Users who are viewing this thread

Back
Top Bottom