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 18-04-2012, 07:46
bprice's Avatar
bprice bprice is offline
Member
 
Join Date: Oct 2006
Location: Edmundston, New Brunswick, Canada
Posts: 89
Default Is Selection Part of a Group?

Hey Everyone,
Quick question... if I search for an object and find it, is there a way to tell if it's contained in a group, and if it is part of a group, select the group that it is in...

Thanks,
B
Reply With Quote
  #2  
Old 18-04-2012, 09:53
shelbym's Avatar
shelbym shelbym is offline
Senior Member
 
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,790
Blog Entries: 13
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default Group

There are several ways to do this, here is one example using ParentGroup.
Code:
Sub GroupTest()
    Dim s As Shape
    
    Set s = ActivePage.Shapes.FindShape(Name:="MyShape")
    
    If Not s.ParentGroup Is Nothing Then
        MsgBox "I am in a group"
    Else
        MsgBox "I am not in a group"
    End If
End Sub
-Shelby
Reply With Quote
  #3  
Old 18-04-2012, 15:57
bprice's Avatar
bprice bprice is offline
Member
 
Join Date: Oct 2006
Location: Edmundston, New Brunswick, Canada
Posts: 89
Default ... and it's that easy!

hahaha Parentgroup... I knew it'd be something quick and easy!

Thank you sir!
Reply With Quote
  #4  
Old 19-04-2012, 18:55
nic nic is offline
Member
 
Join Date: May 2009
Posts: 90
Default

Quote:
Originally Posted by bprice View Post
hahaha Parentgroup... I knew it'd be something quick and easy!

Thank you sir!
its all easy - if you know
but if you never heared of Paris you aint going to guess France's capital
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
this is the first part of my problem. wellboy SecuriDesign 1 24-04-2012 15:10
How to identify if the active selection is group or not aakkaarr CorelDRAW/Corel DESIGNER VBA 3 15-05-2010 16:25
Changing selection when two-shape group loses one shape Joe CorelDRAW/Corel DESIGNER VBA 1 19-02-2009 03:50
Find Group ungroup it then process and again group derasje Macros/Add-ons 2 19-11-2008 05:04
How selected a part of text TheFez CorelDRAW/Corel DESIGNER VBA 2 22-05-2008 08:07


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


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