![]() |
|
#1
|
||||
|
||||
![]()
i can't seem to get my head where it needs to be today...
how do i tell if my currently selected objects are grouped? if my "selection" is all grouped, i want my script to continue... if there is no groups found in my selection, I want it to msgbox an error... i'm sure this is something silly and easy... but i just can't seem to get in gear today! thanks in advance! B |
#2
|
|||
|
|||
![]()
I guess it would be something like this:
Code:
If ActiveSelection.Type = cdrGroupShape Then Code:
Dim sr as New ShapeRange Set sr = ActiveSelectionRange.Shapes.FindShapes(Type:=cdrGroupShape) If sr.Count <> 0 Then Last edited by Manuel; 16-12-2008 at 07:18. |
#3
|
||||
|
||||
![]()
thats what i thought too... but it doesn't work! hence the reason I think I'm going nuts!
![]() Shouldn't this work? Code:
Sub GroupTest() Dim S As Shape Set S = ActiveSelection If S.Type = cdrGroupShape Then S.UngroupAllEx Else MsgBox "No Group" End If End Sub Last edited by bprice; 16-12-2008 at 08:40. Reason: added code |
#4
|
|||
|
|||
![]()
This works...
Code:
Sub GroupTest() Dim S As Shape Set S = ActiveShape If S.Type = cdrGroupShape Then S.UngroupAllEx Else MsgBox "No Group" End If |
#5
|
||||
|
||||
![]()
Excellent! That worked! Thanks muchly!
![]() |
#6
|
||||
|
||||
![]()
i need to throw in a little twist here! what if my "activeshape" has 3 boxes in it... 2 of those boxes are grouped... 1 is not!
Technically the whole object/shape/selection is not a group (even though part of it is)... so it should continue on as if it's NOT a group shouldn't it? since part of it is a group... it sees the entire things as a group when in fact it isn't... why would this be? I guess an example of where I am going would be this.... If I have a bunch of objects selected... and if ANY of the selected objects are NOT in one group... I want it to warn me telling me "some or all of the selected objects are not part of a group" before continuing! Last edited by bprice; 16-12-2008 at 14:49. Reason: added example |
![]() |
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 |
Find Group ungroup it then process and again group | derasje | Macros/Add-ons | 2 | 19-11-2008 04:04 |
Folder Check | norbert_ds | CorelDRAW/Corel DESIGNER VBA | 2 | 13-01-2008 20:18 |
Please someone check this! | knowbodynow | CorelDRAW/Corel DESIGNER VBA | 9 | 31-03-2006 18:46 |
How to Check for two keys pressed at the same time | xombie | CorelDRAW/Corel DESIGNER VBA | 2 | 09-12-2005 09:29 |
How to check presence effects? | G-Kir | CorelDRAW/Corel DESIGNER VBA | 3 | 22-06-2005 06:11 |