Saturday, April 20, 2019

To loop until the last active cell

To loop until the last active cell


Sub loop()
On Error GoTo Err:

Application.Calculation = xlCalculationAutomatic
Sheets("Input Billing Letter").Range("a46").Select
Do Until IsEmpty(ActiveCell)

Sheets("billing letter").Select

Enter your Codes Here

Sheets("input billing letter").Select
ActiveCell.Offset(1, 0).Select
Loop

MsgBox "done"
Exit Sub
Err:
MsgBox "Error."
End Sub

No comments:

Post a Comment