J
Jerry Dyben
From Microsoft training on Loops. copied the following Do While Loop:
Sheets("Sheet1 (2)").Select
x = ActiveCell.Row
y = ActiveCell.Column
z = 0
Do While Cells(x, y).Value <> ""
x = x + 1
z = z + 1
Loop
MsgBox "There are "&z&" cells in the current range."
End Sub
Microsoft Visual Basic MsgBox in red and stated, "Expected:end of statement"
Someone wrote Close. Where and how to you type it into the MsgBox? New
beginner please be more specific.
Sheets("Sheet1 (2)").Select
x = ActiveCell.Row
y = ActiveCell.Column
z = 0
Do While Cells(x, y).Value <> ""
x = x + 1
z = z + 1
Loop
MsgBox "There are "&z&" cells in the current range."
End Sub
Microsoft Visual Basic MsgBox in red and stated, "Expected:end of statement"
Someone wrote Close. Where and how to you type it into the MsgBox? New
beginner please be more specific.