Trapping Cancel Print in V4 Macros - Help

Trapping Cancel Print in V4 Macros - Help

Post by Graham Ashl » Mon, 26 Feb 1996 04:00:00

I am writing some Excel V4.0 macros in which I issue the PRINT
function. I need to branch to a sub macro when the user Cancels from
the 'Now Printing' dialogue box.

To achieve this I am using the ERROR function which seems to do the
trick but is not consistent in its behaviour (ie. sometimes it appears
to trap the Cancel and other times it doesn't). Is this the correct
function to use for this purpose? or am I not using it correctly? I
find the Function Reference Manual explanation of its use very hard to
understand. .

My code goes roughly as follows...
ERROR(TRUE,sub macro name)
I am not sure whether I am supposed to turn error checking back on or
off also at some other part in my code.

I would be very grateful for any assistance and can supply further
detail if required.


1. Macro Moron needs help with print Macro for 123r5

I need a macro that will print a selected (predefined) range to
one printer (fax modem), select a different printer, and print the
same range again. The end result is that I need to hit one button and
end up with both a fax and a hard copy of the range.

Thanks in advance

Peach Orchard, MO                

2. Sendmail errors (rcpl)

3. Help with Excel Add-ins and function macros

4. Living In A Maze - anyone?

5. Excel V4 Macro Help needed!

6. Sr. Electrical Designer PE 10+ years - 2031

7. Quattro V4 (DOS) printing muliple pages HELP

8. Summary -- Spell Checkers

9. HELP: LOTUS123 Macro: local language trap

10. Excel - Auto_Close() macro called before a cancel ?

11. Loading Excel 5.0 add-Ins with Macros

12. VBA, XL4 macros, and add-ins

13. cancel printing