Called subroutine within macro does not function except in Debug / F8 Step Into mode
Posted on 2015-02-10
In the following macro the five "CallClearPlan 1 to 5 routines when run do not clear the 5 plans and the macro ends properly. When I Debug using F8 the macro steps through each of the 5 called Subs and does clear all fields in all 5 plans.
How to correct this poor behavior is my question?
Response = MsgBox(prompt:="Select 'Yes' if you want to clear all 5 plans 'No' to quit.", Buttons:=vbYesNo + vbInformation)
' If statement to check if the yes button was selected.
If Response = vbYes Then
MsgBox "You selected 'Yes' to clear each of 5 Plans", vbExclamation, "Clear Macro"
' The no button was selected.
MsgBox "You selected 'No'. Press 'OK' to quit", vbCritical, " Quit Macro "
Below is a one of the five typical Called sub routines each of which function properly from individual commandbuttons...
' ClearPlan1 Macro