OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 20-08-2013, 10:16
gorgo2 gorgo2 is offline
Senior Member
 
Join Date: Feb 2010
Posts: 107
Default Macro - delete Desktop Layer with warning message

With the code below, I can delete off-page objects...as long as they are assigned the Desktop layer. If there is no object on that layer, I want a warning box to pop up stating so. How can I do this? I imagine that I'll need If then statement something like 'If .....objects on layer Desktop <0 then pop up warning message box, end if.

Code:
Private Sub CommandButton4_Click()
    ActiveDocument.BeginCommandGroup
ActiveDocument.MasterPage.DesktopLayer.Shapes.All.Delete
    ActiveDocument.EndCommandGroup
End Sub
__________________
Using: CorelDraw X4 (14.0.0.701)
OS: Windows XP Pro
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
delete shapes in particular layer gorgo CorelDRAW/Corel DESIGNER VBA 3 24-06-2013 23:03
macro causing annoying warning box gorgo Code Critique 2 21-03-2013 10:26
X5 move selected objects to desktop layer? knowbodynow CorelDRAW/Corel DESIGNER VBA 2 10-11-2011 13:24
Global Macro delete Michael Cervantes CorelDRAW/Corel DESIGNER VBA 17 16-11-2010 09:11
Shapes outside page bounds automatically move to Desktop Layer Janga General 5 16-06-2010 16:52


All times are GMT -5. The time now is 22:21.


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