Hi can you help me fill in the code to export my sheets to text (tab) delimited files? This is what I've done so for.
Sub Macro1()
Dim wksht As Worksheet
Dim i As Long
Dim sFilename As String
Dim wkshtnames() 'This is an array definition
i = 0
For Each wksht In ActiveWorkbook.Worksheets
i = i + 1
ReDim Preserve wkshtnames(1 To i)
wkshtnames(i) = wksht.Name
'strFilename = "C:\" & wkshtnames(i) & ".txt"
'sPath = "C:\"
'Open strFilename For Binary As #1
'Put #1, , TextArray 'writes to file
'Close #1
Next wksht
For i = LBound(wkshtnames) To UBound(wkshtnames)
MsgBox wkshtnames(i)
Next i
End Sub
THANK YOU




Reply With Quote