so how do you stop?

  • Thread starter Thread starter John
  • Start date Start date
J

John

I've been using END to end a program (sub, macro). Now I read that isn't
good vba programing. What is good?

John
 
End Sub is the proper way to end a macro procedure. End Function for
Functions. End If, End With are all normal statements for VBA code. Perhaps
what you are referring to is stopping the macro in mid procedure with just
the End statement. That can be problematic. It would be safer to Exit a
Sub or Function or an operation because that does not destroy anything.
 
P.S. Look up "End Statement" in VBA help file. That will explain all the
uses of End except for the End property which is an entirely different
animal.
 
Back
Top