What kind of program is this?
If it is VBA, you can program the file renaming part right into the VBA.
If you post your VBA code, we can help you do that part.
"C:\Finances\QBooks\25SEP21B.txt", FileFormat:=xlText, _
"C:\Finances\QBooks\25SEP21B.iif", FileFormat:=xlText, _
Thanks. Fresh eyes and a clear mind. I couldn't switch to IIF when recording the macro; the Dialog Box just tacked .TXT on to my [name].IIF. I had tunnel vision about changing it in the code.It looks like that is what you are telling it to do, right in your code.
Just try changing thie line:
to this:Rich (BB code):"C:\Finances\QBooks\25SEP21B.txt", FileFormat:=xlText, _
Rich (BB code):"C:\Finances\QBooks\25SEP21B.iif", FileFormat:=xlText, _
Yes, while the Macro Recorder can be a great tool to get you started, it often requires a little bit of editing after completion to make the code more dynamic and streamlined.Thanks. Fresh eyes and a clear mind. I couldn't switch to IIF when recording the macro; the Dialog Box just tacked .TXT on to my [name].IIF. I had tunnel vision about changing it in the code.
Your code worked just fine for me. What kind of error message do you get? What exactly does it say?As I was wos,figddlingg with the problem (including some pretty dense code by the board member Stacker) I tried the NAME command. This problem is solved but for future refence, do you see why the code below bombs at the starred line?
/*
Sub VBA_Name_Function_Ex1()
Dim sFileName1 As String, sFileName2 As String
sFileName1 = "C:\Users\Jim Gleason\Finances\QBooks\25SEP21B.TXT"
sFileName2 = "C:\Users\Jim Gleason\Finances\QBooks\25SEP21B.IIF"
** Name sFileName1 As sFileName2 **
End Sub
*/