Hi,
I want to save a worksheet of a workbook as a text-document.
My newbie problem is that the VBA macro adds quote marks "" around the contents of some cells; whereas the manual File-Save As ... does not.
I found a work-around by delimiting the length of the string in that cell, which was a very long like in the example.
Sub MacroProducesQmarks()
Cells(2, 1) = "{This is a very long string which I want to save without any quotation marks and this works when doing save as manually, but when I record a macro and run it then it will add the quotes}"
ActiveWorkbook.SaveAs Filename:="D:\UserData\longStringOutput.txt", _
FileFormat:=xlText, CreateBackup:=False
End Sub
Thanks for your help
I want to save a worksheet of a workbook as a text-document.
My newbie problem is that the VBA macro adds quote marks "" around the contents of some cells; whereas the manual File-Save As ... does not.
I found a work-around by delimiting the length of the string in that cell, which was a very long like in the example.
Sub MacroProducesQmarks()
Cells(2, 1) = "{This is a very long string which I want to save without any quotation marks and this works when doing save as manually, but when I record a macro and run it then it will add the quotes}"
ActiveWorkbook.SaveAs Filename:="D:\UserData\longStringOutput.txt", _
FileFormat:=xlText, CreateBackup:=False
End Sub
Thanks for your help