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

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

qt - Change color of QGraphicsView rubber band -

c++ - Visible files in the "Projects" View of the Qt Creator IDE if using the CMake build system -