VBAもBASICの一種だから行番号は付けられるんだけどね

Sub Foo()
10 Dim i As Integer
20 Debug.Print i
30 i = i + 1: GoTo 20
40 End Sub