I am trying to overwrite a line to a text file using Excel VBA.
My goal is to create a line in the text file that reads:
$bdate June 14, 2016
But I get:
"$bdate June 14, 2016"
Removing the comma will produce a line without doublequotes, but I need the comma to be a part of the string.
Here is what I am working with:
strstatementdate = Format(Date, "mmmm, d yyyy")
Workbooks.OpenText Filename:=strExportDir & strMacroName, Origin:=437, _
StartRow:=1, DataType:=xlDelimited, TextQualifier:=xlTextQualifierDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, Semicolon:=False, Comma:=False, _
Space:=False, Other:=False, FieldInfo:=Array(1, 2), _
TrailingMinusNumbers:=True
Range("A36").Value = "$bdate " & strstatementdate
ActiveWorkbook.Save
I've tried making some changes to the Workbooks.OpenText line based on Workbooks.OpenText Method (Excel) and suggestions from
Opening CSV in Excel using VBA causes Data to appear in two columns instead of one
but I have been unsuccessful solving the issue.
Does anyone have any tips to solve this issue?