VBA "Loop" within If Else statement -


can tell me why getting compile error: "loop without do" following code.

sub burrito_log()      dim j long     j = 1             x = inputbox("how many burritos did have today?")         cells(j, 2) = x         cells(j, 1) = date         j = j + 1          ans = msgbox("burrito log", vbyesno, "are done inputting?")         if ans = vbyes             'do nothing         else             loop         end if  end sub 

after formating code error obvious. loop located before end if. move after end if.


Comments

Popular posts from this blog

google chrome - Developer tools - How to inspect the elements which are added momentarily (by JQuery)? -

angularjs - Showing an empty as first option in select tag -

php - Cloud9 cloud IDE and CakePHP -