![]() |
#1
|
|||
|
|||
![]()
Hi everyone, I'm having an issue when I try to select all the shapes in the active Page. The problem is when I have just one shape in the Page.
Code:
Dim sr As ShapeRange sr = ActivePage.Shapes.All msgBox sr.count |
#2
|
||||
|
||||
![]()
Hi,
Objects are a little different then variables. You have to use the set keyword. Just put "set" in front of sr. -John |
#3
|
|||
|
|||
![]()
Yes I use "set" I just forgot when I write the post... This doesn't work If there's just one shape in the page.
Code:
Dim sr As ShapeRange set sr = ActivePage.Shapes.All msgBox sr.count |
#4
|
||||
|
||||
![]()
Hi,
It's returning 1 for me. What version are you using? -John |
#5
|
|||
|
|||
![]()
Oh sorry my fault, what I was doing exactly was...
Code:
Dim sh As Shape Dim sr As ShapeRange Set sh = ActivePage.Shapes.All.Group sh.AlignToPageCenter cdrAlignLeft + cdrAlignRight, cdrTextAlignBoundingBox sh.AlignToPageCenter cdrAlignTop + cdrAlignBottom, cdrTextAlignBoundingBox Set sr = sh.Shapes.All Code:
Dim sh As Shape Dim sr As ShapeRange ActivePage.Shapes.All.Group Set sr = ActivePage.Shapes.All sr.AlignToPageCenter cdrAlignLeft + cdrAlignRight, cdrTextAlignBoundingBox sr.AlignToPageCenter cdrAlignTop + cdrAlignBottom, cdrTextAlignBoundingBox |
![]() |
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 |
Selecting shapes during a macro still runs | mateushenrico | CorelDRAW/Corel DESIGNER VBA | 1 | 21-02-2009 00:38 |
Selecting shapes in rectangle area | lukswa | CorelDRAW/Corel DESIGNER VBA | 2 | 07-10-2008 02:13 |
Eraser issue | jahmer | General | 0 | 17-01-2008 15:59 |
SetSize issue | Dave Rowland | CorelDRAW/Corel DESIGNER VBA | 3 | 11-01-2008 16:36 |
Selecting multiple Named shapes | Mitsu1 | CorelDRAW/Corel DESIGNER VBA | 2 | 09-11-2006 10:07 |