This is a macro which saves the current spreadsheet tab as a tab delimited file with an extension of ".dat". It does not work in 2010. How can I convert it to work in 2010?
Thanks.
Code:
Dim wb As Workbook
Dim s As String
Set wb = Application.ActiveWorkbook
s = wb.FullName ' <== Error is here
s = Replace(s, ".xls", ".dat")
ActiveWorkbook.SaveAs Filename:=s, FileFormat:=xlText, CreateBackup:=False
MsgBox "Saved tab-delim file as " & s
Last edited: