C
Curt
what do I need to set in refrences in VBA to find .writeline when I removed
this it compiled onto outputline. will enclose full code
Thanks Much
Sub AAAA()
Dim lastrow As Variable
Dim RowCount As Integer
Dim lastcol As Variable
Dim ColCount As Integer
Dim OutPutLine As Variable
Dim Delimiter As Variable
Dim tswrite As Variable
Dim FSO As Scripting.FileSystemObject
Dim AAA As Scripting.TextStream
Set FSO = New Scripting.FileSystemObject
Set AAA = FSO.CreateTextFile("C:\Parade\ZZZ.txt")did not create this
'AAA.writeline "This Is Line One"---works with this in place
' With .ActiveSheet---
lastrow = Cells(Rows.Count, "A").End(xlUp).row
For RowCount = 1 To lastrow
lastcol = Cells(RowCount, Columns.Count).End(xlToLeft).Column
For ColCount = 1 To lastcol
If ColCount = 1 Then
OutPutLine = Cells(RowCount, ColCount)
Else
OutPutLine = OutPutLine & Delimiter & Cells(RowCount, ColCount)
End If
' End With
Next ColCount
OutPutLine = Trim(OutPutLine)
If Len(OutPutLine) <> 0 Then
tswrite.writeline OutPutLine-----------------ran to here
End If
Next RowCount
End Sub
this it compiled onto outputline. will enclose full code
Thanks Much
Sub AAAA()
Dim lastrow As Variable
Dim RowCount As Integer
Dim lastcol As Variable
Dim ColCount As Integer
Dim OutPutLine As Variable
Dim Delimiter As Variable
Dim tswrite As Variable
Dim FSO As Scripting.FileSystemObject
Dim AAA As Scripting.TextStream
Set FSO = New Scripting.FileSystemObject
Set AAA = FSO.CreateTextFile("C:\Parade\ZZZ.txt")did not create this
'AAA.writeline "This Is Line One"---works with this in place
' With .ActiveSheet---
lastrow = Cells(Rows.Count, "A").End(xlUp).row
For RowCount = 1 To lastrow
lastcol = Cells(RowCount, Columns.Count).End(xlToLeft).Column
For ColCount = 1 To lastcol
If ColCount = 1 Then
OutPutLine = Cells(RowCount, ColCount)
Else
OutPutLine = OutPutLine & Delimiter & Cells(RowCount, ColCount)
End If
' End With
Next ColCount
OutPutLine = Trim(OutPutLine)
If Len(OutPutLine) <> 0 Then
tswrite.writeline OutPutLine-----------------ran to here
End If
Next RowCount
End Sub