I am simply opening a file, deleting two lines and changing the contents of cell a1 and then trying to save the excel file as a tab delimited text file. I have tried so many ways but everything is giving me a compilation reading "expected statement" error wherever there is a colon (:).
Set ExcelObject = CreateObject("Excel.Application")
ExcelObject.visible = True
ExcelObject.Workbooks.Open"c:\snowfall.xlsx",Default, False
ExcelObject.sheets(1).Rows("1:2").Delete
ExcelObject.Sheets(1).Cells(1,1).value = "testing write function"
ExcelObject.SaveAs Filename:=Activesheet.name, FileFormat:=xlText, _
the only line that has an error is the last one:
ExcelObject.SaveAs Filename:=Activesheet.name, FileFormat:=xlText, _
I have been banging my head against the wall for the last three days trying to get this to work :/