Hi,
I am doing a macro that uses Do Until...Loop to process on certain column
data(Col G) and go thru row by row on my wksheet and print that
string(Print#2) onto a script txt file.
The problem is i am always stuck at row 1 and does not automatically go to
the next row of data. CAn anyone advise why is this so and how to?
My Example:
Sub test( )
Do Until ActiveCell.Row > LastRow
ActiveCell.FormulaR1C1 = Range("G2")
Total$ = ActiveCell.FormulaR1C1
If ActiveCell.FormulaR1C1 = "" Then GoTo Skiptohere
Print #2, "testing"
Print #2, "testing"
Print #2, "testing"
Skiptohere:
Print #2, " #End script file"
Close #2
ActiveCell.Offset(1, 0).Range("A7").Select
Loop
End Sub
Bookmarks