![]() |
#1
|
|||
|
|||
![]()
Hi there,
I'm trying to cancel a save if the user selects save and certain criteria are met. However, I would like them to be able to use save as (as the point of this macro is to prevent them saving a document without renaming it first). Here's the tricky bit - the QuerySave event lets you cancel the save, but it doesn't check if save or save as has been used. BeforeSave lets you check if save or save as has been used, but it doesn't let you cancel the save. I've been experimenting (i.e. by adding the functionality into the event in a rather rudimentary fashion) but I've not had any luck. And googling the issues unearths thousands of Excel VBA snippets where the BeforeSave event does exactly what I want it to do. Grrr... If anyone has any bright ideas I would be very, very grateful! Cheers |
#2
|
|||
|
|||
![]()
Hi,
Two thoughts: One, why not just do the rename and save yourself in QuerySave then cancel the save the user requested. Two, if you REALLY want to stop the user from doing this then you are wasting your time. The Object Model allows you to disable events completely, and X4 even comes with a nifty little button that you just push and then your event code will do nothing. -James Leonard |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Command Bar events | lnfagf | Macros/Add-ons | 2 | 15-06-2010 17:08 |
ThisDocument Events | mapcar | Corel Photo-Paint VBA | 1 | 16-08-2009 14:23 |
Just use events ! | TheFez | CorelDRAW/Corel DESIGNER VBA | 0 | 06-06-2008 03:23 |
Need help making a macro for multiple saves in Corel Draw 12 | opinionsrfun | General | 2 | 31-08-2007 09:26 |
Cancelling a macro when hitting the "Cancel" button | annedeblois | CorelDRAW/Corel DESIGNER VBA | 1 | 23-03-2006 16:05 |