Hi. I'm trying to create a macro that exports only one of my worksheets (worksheet "GTG") to a comma delimited text file named "GTG_Template". Pasting my current attempt below, but it doesn't work right, seems to save a text file but no delimit character and I think it's saving all worksheets. I've entered the path where I want the file to save to on a worksheet named Menu in cell B8. I've entered the name I want the file saved as (excl the extension) in cell B9.
Sub CreateTextFile
Dim sMaster As Workbook
Dim sMenu As Worksheet
Dim sGTG As Worksheet
Dim txtPath As String
Set sMaster = ThisWorkbook
Set sMenu = sMaster.Worksheets("Menu")
Set sGTG = sMaster.Worksheets("GTG")
txtPath = sMenu.Range("B8") & sMenu.Range("B9")
ActiveWorkbook.SaveAs Filename:= _
txtPath & ".txt", FileFormat:= _
xlText, CreateBackup:=False, TextVisualLayout:=Chr(44)
End Sub
Sub CreateTextFile
Dim sMaster As Workbook
Dim sMenu As Worksheet
Dim sGTG As Worksheet
Dim txtPath As String
Set sMaster = ThisWorkbook
Set sMenu = sMaster.Worksheets("Menu")
Set sGTG = sMaster.Worksheets("GTG")
txtPath = sMenu.Range("B8") & sMenu.Range("B9")
ActiveWorkbook.SaveAs Filename:= _
txtPath & ".txt", FileFormat:= _
xlText, CreateBackup:=False, TextVisualLayout:=Chr(44)
End Sub