OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 07-03-2011, 09:07
Murray
Guest
 
Posts: n/a
Default Cancelling saves with events

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
Reply With Quote
  #2  
Old 07-03-2011, 12:32
jemmyell jemmyell is offline
Senior Member
 
Join Date: Jan 2005
Location: Orange County, California, USA, Earth, Solar System, Milky Way Galaxy
Posts: 157
Default

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
__________________
-James Leonard
CNC Inlay Guy - www.CorelDRAWCadCam.com
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT -5. The time now is 12:05.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com