J
JeffH
I have a do loop that prints a repetitive report for a range of companies on
a specified list. The problem is that once I involke the macro to print it
goes through the entire list with no ability for me to stop it (or at least I
don't know how).
I thought I could add a MsgBox in the loop and it would cancel printing, but
it does not. It loops through, asks me the question in the msgbox, but does
not end the loop when I answer "NO".
An abreviated example of what I got going is:
Dim i As Integer
i=9
Do until ("A" & i) = "" (it stops printing when the list is empty)
(Following is the code to print the range)
MsgBox "Continue Printing?', vbOKCancel, "Printing"
i = i +1
Loop
a specified list. The problem is that once I involke the macro to print it
goes through the entire list with no ability for me to stop it (or at least I
don't know how).
I thought I could add a MsgBox in the loop and it would cancel printing, but
it does not. It loops through, asks me the question in the msgbox, but does
not end the loop when I answer "NO".
An abreviated example of what I got going is:
Dim i As Integer
i=9
Do until ("A" & i) = "" (it stops printing when the list is empty)
(Following is the code to print the range)
MsgBox "Continue Printing?', vbOKCancel, "Printing"
i = i +1
Loop