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 17-10-2003, 13:57
dominiqueL
Guest
 
Posts: n/a
Default function delete after duplicate

Hi,
I have an object named Rect1
"Set Rect1 = ActiveShape"
I select all objects of the page and I duplicate

For Counter = 1 To (NumberX - 2)
ActiveShape.Duplicate 0, (DimY * Counter)
Next Counter
When I duplicated X time and that I want to suppress the "Rect1" objects, he/it only suppresses the first.

"Rect1.Delete"

how to make to erase all Rect1 ?
Reply With Quote
  #2  
Old 17-10-2003, 15:42
Alex's Avatar
Alex Alex is offline
Administrator
 
Join Date: Nov 2002
Posts: 1,940
Blog Entries: 4
Default Re: function delete after duplicate

Dominique,

When you call Shape.Duplicate, it returns you the newly created shape. You can assign it to a variable or store in a shape range. For example:

Code:
Dim s As Shape
Dim sr As New ShapeRange

Set s = ActiveShape
For i = 1 to 10

    Set s = s.Duplicate(...)
    sr.Add s ' Add the new shape to ShapeRange
Next i
...
sr.Delete ' Delete all shapes stored in the shape range
Reply With Quote
  #3  
Old 18-10-2003, 01:35
dominiqueL
Guest
 
Posts: n/a
Default Re: function delete after duplicate

Alex,
It is a little more complicated than your answer, certainly Interesting, that will serve to me subsequently.
I have a Rect1 object well but with other included objects.
I duplicate all objects, but at the end I want to suppress the Rect1 object and these duplications only. I cannot use:
Set s = ActiveShape since it regroups Rect1 and the other objects.
cordially
Dominique
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
how to use getpixel() to get the Image color? lees CorelDRAW/Corel DESIGNER VBA 6 17-10-2004 01:13
Printing Raw Prn Files Mark Code Critique 2 16-09-2004 17:15
Function names Lev Oberon Function Plotter 1 29-08-2003 12:04
How can I get data from function? Elie CorelDRAW/Corel DESIGNER VBA 3 15-05-2003 06:08
takes Draw a long time to start a new document! bbolte CorelDRAW/Corel DESIGNER VBA 5 14-05-2003 10:09


All times are GMT -5. The time now is 02:15.


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