To all,
I am a programming novice who needs some help importing a multi-line text file and outputting it. The text file looks like this:
LIST CAR-INV WITH STATUS EQ "S" AND WITH I-ACCT NE
"12345""23456""34567""45678""56789""98765""87654""76543""65432"""
DAYS COLOR I-ACCT MAKE MILES MODEL MODEL-NO. MODEL-YEAR SLIST
SERIAL STANDARD_BODY STANDARD_COLOR STICKER STOCK-NO. STOCK-TYPE
ID-SUPP NOPAGE SUPP
I need to take in each line and write it out as a terminal command. I am okay with writing commands to the terminal, but I am having alot of difficulty importing the text file and getting each line in to it's own string. What I have so far looks like this:
Dim DownloadDir As String
Dim ENGStatementFile As String
Dim Import As String
DownloadDir = "D:\download\"
ENGStatementFile = "statement.eng"
Set ENGStatement = GetObject("Scripting.FileSystemObject")
Set Action = GetObject(DownloadDir & ENGStatementFile, True)
Action.ReadAll = Import
Action.Close
On Error GoTo 0
With Session
.Transmit Import
I'm sure that this is the wrong way to do it, but this is way more advanced than I have ever needed to make a VBA macro. I can add a delimiter to the end of each line if needed, like a semi-colon, but I was hoping that it could be done without one. Any help would be greatly appreciated.
I am a programming novice who needs some help importing a multi-line text file and outputting it. The text file looks like this:
LIST CAR-INV WITH STATUS EQ "S" AND WITH I-ACCT NE
"12345""23456""34567""45678""56789""98765""87654""76543""65432"""
DAYS COLOR I-ACCT MAKE MILES MODEL MODEL-NO. MODEL-YEAR SLIST
SERIAL STANDARD_BODY STANDARD_COLOR STICKER STOCK-NO. STOCK-TYPE
ID-SUPP NOPAGE SUPP
I need to take in each line and write it out as a terminal command. I am okay with writing commands to the terminal, but I am having alot of difficulty importing the text file and getting each line in to it's own string. What I have so far looks like this:
Dim DownloadDir As String
Dim ENGStatementFile As String
Dim Import As String
DownloadDir = "D:\download\"
ENGStatementFile = "statement.eng"
Set ENGStatement = GetObject("Scripting.FileSystemObject")
Set Action = GetObject(DownloadDir & ENGStatementFile, True)
Action.ReadAll = Import
Action.Close
On Error GoTo 0
With Session
.Transmit Import
I'm sure that this is the wrong way to do it, but this is way more advanced than I have ever needed to make a VBA macro. I can add a delimiter to the end of each line if needed, like a semi-colon, but I was hoping that it could be done without one. Any help would be greatly appreciated.