Hello,
My code is below.
I want to add to this code something that will remove any rows that have the value 0 (zero).
Any thoughts will be much appreciated!
Dalex
Private Sub Workbook_Open()
Application.EnableEvents = True
Dim FileNum As Long, i As Long
Dim y As Variant
FileNum = FreeFile
Open "c:\temp\Blah.txt" For Append As #FileNum
For i = 2 To 10000
With Application.WorksheetFunction
y = .Transpose(.Transpose(Range(Cells(i, 1), _
Cells(i, 3))))
End With
Print #FileNum, Join(y, vbNullString)
Next
Close #FileNum
Application.DisplayAlerts = False
Application.Quit
End Sub
My code is below.
I want to add to this code something that will remove any rows that have the value 0 (zero).
Any thoughts will be much appreciated!
Dalex
Private Sub Workbook_Open()
Application.EnableEvents = True
Dim FileNum As Long, i As Long
Dim y As Variant
FileNum = FreeFile
Open "c:\temp\Blah.txt" For Append As #FileNum
For i = 2 To 10000
With Application.WorksheetFunction
y = .Transpose(.Transpose(Range(Cells(i, 1), _
Cells(i, 3))))
End With
Print #FileNum, Join(y, vbNullString)
Next
Close #FileNum
Application.DisplayAlerts = False
Application.Quit
End Sub