Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Determining the group a picture or textbox is a member of

If I select an item (picture or textbox) of a group how do
I determine what the group or group name the item is a
member of?

David
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Determining the group a picture or textbox is a member of

If the controls are grouped using Frame controls, you can use the Parent
property of the control to return the Frame that the control belongs to. Or,
depending on how you have formed the groups, you can use the GroupName
property of the control.

--

Vasant


"David Cuthill" wrote in message
...
If I select an item (picture or textbox) of a group how do
I determine what the group or group name the item is a
member of?

David



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Determining the group a picture or textbox is a member of

I'm sorry - I am refering to a picture or a label that is
inserted on a worksheet not a user form. The picture and
label form a grouped image and I want to determine the
group name if one of the grouped items is selected.


David

-----Original Message-----
If the controls are grouped using Frame controls, you can

use the Parent
property of the control to return the Frame that the

control belongs to. Or,
depending on how you have formed the groups, you can use

the GroupName
property of the control.

--

Vasant


"David Cuthill"

wrote in message
...
If I select an item (picture or textbox) of a group how

do
I determine what the group or group name the item is a
member of?

David



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default Determining the group a picture or textbox is a member of

Do you mean labels from the Forms toolbox which have been subsequently
grouped? These labels are Shape objects and have a GroupItms which
returns their respective GroupShapes collection, but this collection
object doesn't have a Name property. How did you set the group's name
originally?

--

"David Cuthill" wrote in message ...
I'm sorry - I am refering to a picture or a label that is
inserted on a worksheet not a user form. The picture and
label form a grouped image and I want to determine the
group name if one of the grouped items is selected.


David

-----Original Message-----
If the controls are grouped using Frame controls, you can

use the Parent
property of the control to return the Frame that the

control belongs to. Or,
depending on how you have formed the groups, you can use

the GroupName
property of the control.

--

Vasant


"David Cuthill"

wrote in message
...
If I select an item (picture or textbox) of a group how

do
I determine what the group or group name the item is a
member of?

David



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Determining the group a picture or textbox is a member of

Sorry, not sure how to do that. Is this a real group that Excel recognizes,
or just what you consider to be a group? What were the mechanics of the
grouping process?

--

Vasant



"David Cuthill" wrote in message
...
I'm sorry - I am refering to a picture or a label that is
inserted on a worksheet not a user form. The picture and
label form a grouped image and I want to determine the
group name if one of the grouped items is selected.


David

-----Original Message-----
If the controls are grouped using Frame controls, you can

use the Parent
property of the control to return the Frame that the

control belongs to. Or,
depending on how you have formed the groups, you can use

the GroupName
property of the control.

--

Vasant


"David Cuthill"

wrote in message
...
If I select an item (picture or textbox) of a group how

do
I determine what the group or group name the item is a
member of?

David



.





  #6   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Determining the group a picture or textbox is a member of

I create the group using code.

I insert a picture into the worksheet
(activesheet.picture.insert ...) and then create a textbox
(activesheet.shapes.addlabel ...) in close proximity to
the inserted picture. I then select the two items and
group them by using ...

ActiveSheet.Shapes.Range(Array(PictName, LabelName)).Select
Selection.ShapeRange.Group.Select

I then name the group using a preselected naming
convention.

What I want to be able to do is when either of the grouped
items is selected (which results in the name of the item
being displayed in the name box on the left hand side of
the formula bar) is determine, using code, which group the
selected item belongs to.

I have tried using things like Parent and GroupName but I
can't seem to get it work as appears that I am not
applying it to the correct object.


David


-----Original Message-----
Sorry, not sure how to do that. Is this a real group that

Excel recognizes,
or just what you consider to be a group? What were the

mechanics of the
grouping process?

--

Vasant



"David Cuthill"

wrote in message
...
I'm sorry - I am refering to a picture or a label that

is
inserted on a worksheet not a user form. The picture and
label form a grouped image and I want to determine the
group name if one of the grouped items is selected.


David

-----Original Message-----
If the controls are grouped using Frame controls, you

can
use the Parent
property of the control to return the Frame that the

control belongs to. Or,
depending on how you have formed the groups, you can

use
the GroupName
property of the control.

--

Vasant


"David Cuthill"

wrote in message
...
If I select an item (picture or textbox) of a group

how
do
I determine what the group or group name the item is

a
member of?

David


.



.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Determining the group a picture or textbox is a member of

I believe I have figured it out ... after much searching.

ActiveSheet.Shapes(PictName).ParentGroup.Name

gives me the name of the group the shape belongs to.

Thanks


-----Original Message-----
Sorry, not sure how to do that. Is this a real group that

Excel recognizes,
or just what you consider to be a group? What were the

mechanics of the
grouping process?

--

Vasant



"David Cuthill"

wrote in message
...
I'm sorry - I am refering to a picture or a label that

is
inserted on a worksheet not a user form. The picture and
label form a grouped image and I want to determine the
group name if one of the grouped items is selected.


David

-----Original Message-----
If the controls are grouped using Frame controls, you

can
use the Parent
property of the control to return the Frame that the

control belongs to. Or,
depending on how you have formed the groups, you can

use
the GroupName
property of the control.

--

Vasant


"David Cuthill"

wrote in message
...
If I select an item (picture or textbox) of a group

how
do
I determine what the group or group name the item is

a
member of?

David


.



.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
current time member Miri Excel Discussion (Misc queries) 1 April 9th 08 08:28 AM
Member database question! Lars Grøtteland Excel Worksheet Functions 0 September 6th 06 01:57 PM
condition - member of a group elbows Excel Discussion (Misc queries) 3 March 13th 06 04:57 PM
Is member of an array? Shatin Excel Programming 7 January 28th 04 06:17 PM
Is it possible to set a class member to be another class member? Michael[_21_] Excel Programming 3 October 30th 03 08:28 AM


All times are GMT +1. The time now is 03:27 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"