Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Editting textbox value that is grouped with a shape

I am trying to edit the value of a textbox that I have
grouped with a shape (using code). The only way I can seem
to change the value is to ungroup the shape and textbox
then change the value of the textbox and then regroup
them. Is there a more simpler way of doing this - how do
you access a grouped textbox to edit the content?

David
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Editting textbox value that is grouped with a shape

Is the textbox from the control toolbox toolbar or from the forms toolbar

What is the shape?

Why not post the code the does the ungrouping, updating and regrouping.

--
Regards,
Tom Ogilvy

"David Cuthill" wrote in message
...
I am trying to edit the value of a textbox that I have
grouped with a shape (using code). The only way I can seem
to change the value is to ungroup the shape and textbox
then change the value of the textbox and then regroup
them. Is there a more simpler way of doing this - how do
you access a grouped textbox to edit the content?

David



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Editting textbox value that is grouped with a shape

The image and textbox are not from a control they are
insert directly on the worksheet.

First of all I insert a picture using:
Set NewPict = curWks.Pictures.Insert(myPictName)

then I place a textbox with a number in it to denote the
picture number using:

Set Newlabel = curWks.Shapes.AddLabel
(msoTextOrientationHorizontal, LabelLocHorz, LabelLocVert,
75, 75)
Newlabel.TextFrame.Characters.Text = PictureNum

Then I group the picture and the textbox

To access the Label or textbox the only way I can do it is
to ungroup and change the text as follows ... I thought I
should be able to access the text without ungrouping or am
I using the wrong type of object?


Selection.ShapeRange.Ungroup.Select
ActiveSheet.DrawingObjects(Array
("Picture", "Label")).Select
ActiveSheet.DrawingObjects("Label").Characters.Tex t = "10"


David

-----Original Message-----
Is the textbox from the control toolbox toolbar or from

the forms toolbar

What is the shape?

Why not post the code the does the ungrouping, updating

and regrouping.

--
Regards,
Tom Ogilvy

"David Cuthill"

wrote in message
...
I am trying to edit the value of a textbox that I have
grouped with a shape (using code). The only way I can

seem
to change the value is to ungroup the shape and textbox
then change the value of the textbox and then regroup
them. Is there a more simpler way of doing this - how do
you access a grouped textbox to edit the content?

David



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Editting textbox value that is grouped with a shape

The frustrating part of this is I can make the change to
the text in the label or text box manually but when either
I try to record code to do it or do it with code it can't
be accessed or changed without ungrouping.



-----Original Message-----
The image and textbox are not from a control they are
insert directly on the worksheet.

First of all I insert a picture using:
Set NewPict = curWks.Pictures.Insert(myPictName)

then I place a textbox with a number in it to denote the
picture number using:

Set Newlabel = curWks.Shapes.AddLabel
(msoTextOrientationHorizontal, LabelLocHorz,

LabelLocVert,
75, 75)
Newlabel.TextFrame.Characters.Text = PictureNum

Then I group the picture and the textbox

To access the Label or textbox the only way I can do it

is
to ungroup and change the text as follows ... I thought I
should be able to access the text without ungrouping or

am
I using the wrong type of object?


Selection.ShapeRange.Ungroup.Select
ActiveSheet.DrawingObjects(Array
("Picture", "Label")).Select
ActiveSheet.DrawingObjects("Label").Characters.Te xt = "10"


David

-----Original Message-----
Is the textbox from the control toolbox toolbar or from

the forms toolbar

What is the shape?

Why not post the code the does the ungrouping, updating

and regrouping.

--
Regards,
Tom Ogilvy

"David Cuthill"

wrote in message
.. .
I am trying to edit the value of a textbox that I have
grouped with a shape (using code). The only way I can

seem
to change the value is to ungroup the shape and textbox
then change the value of the textbox and then regroup
them. Is there a more simpler way of doing this - how

do
you access a grouped textbox to edit the content?

David



.

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Editting textbox value that is grouped with a shape

It appears you have to ungroup them:

http://support.microsoft.com/default...12&Product=xlw
Control Method of Sheet Class Failed with Grouped Control

--
Regards,
Tom Ogilvy


"David Cuthill" wrote in message
...
The image and textbox are not from a control they are
insert directly on the worksheet.

First of all I insert a picture using:
Set NewPict = curWks.Pictures.Insert(myPictName)

then I place a textbox with a number in it to denote the
picture number using:

Set Newlabel = curWks.Shapes.AddLabel
(msoTextOrientationHorizontal, LabelLocHorz, LabelLocVert,
75, 75)
Newlabel.TextFrame.Characters.Text = PictureNum

Then I group the picture and the textbox

To access the Label or textbox the only way I can do it is
to ungroup and change the text as follows ... I thought I
should be able to access the text without ungrouping or am
I using the wrong type of object?


Selection.ShapeRange.Ungroup.Select
ActiveSheet.DrawingObjects(Array
("Picture", "Label")).Select
ActiveSheet.DrawingObjects("Label").Characters.Tex t = "10"


David

-----Original Message-----
Is the textbox from the control toolbox toolbar or from

the forms toolbar

What is the shape?

Why not post the code the does the ungrouping, updating

and regrouping.

--
Regards,
Tom Ogilvy

"David Cuthill"

wrote in message
...
I am trying to edit the value of a textbox that I have
grouped with a shape (using code). The only way I can

seem
to change the value is to ungroup the shape and textbox
then change the value of the textbox and then regroup
them. Is there a more simpler way of doing this - how do
you access a grouped textbox to edit the content?

David



.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default Editting textbox value that is grouped with a shape

This is speaking about controls - do I apply the same
logic to what I'm doing then?

It seems odd that I can access the textbox when not using
code.


-----Original Message-----
It appears you have to ungroup them:

http://support.microsoft.com/default.aspx?scid=kb;en-

us;115312&Product=xlw
Control Method of Sheet Class Failed with Grouped Control

--
Regards,
Tom Ogilvy


"David Cuthill"

wrote in message
...
The image and textbox are not from a control they are
insert directly on the worksheet.

First of all I insert a picture using:
Set NewPict = curWks.Pictures.Insert(myPictName)

then I place a textbox with a number in it to denote the
picture number using:

Set Newlabel = curWks.Shapes.AddLabel
(msoTextOrientationHorizontal, LabelLocHorz,

LabelLocVert,
75, 75)
Newlabel.TextFrame.Characters.Text = PictureNum

Then I group the picture and the textbox

To access the Label or textbox the only way I can do it

is
to ungroup and change the text as follows ... I thought

I
should be able to access the text without ungrouping or

am
I using the wrong type of object?


Selection.ShapeRange.Ungroup.Select
ActiveSheet.DrawingObjects(Array
("Picture", "Label")).Select
ActiveSheet.DrawingObjects("Label").Characters.Tex t

= "10"


David

-----Original Message-----
Is the textbox from the control toolbox toolbar or from

the forms toolbar

What is the shape?

Why not post the code the does the ungrouping, updating

and regrouping.

--
Regards,
Tom Ogilvy

"David Cuthill"

wrote in message
...
I am trying to edit the value of a textbox that I

have
grouped with a shape (using code). The only way I can

seem
to change the value is to ungroup the shape and

textbox
then change the value of the textbox and then regroup
them. Is there a more simpler way of doing this -

how do
you access a grouped textbox to edit the content?

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
I need help with a table formula/mass editting urlocaljeweler New Users to Excel 2 November 18th 09 07:29 PM
Grouped Items won't Stay Grouped When Moving Object Heather02 Excel Discussion (Misc queries) 0 February 12th 09 07:08 PM
Cutting and Pasting Cells into a shape or textbox Gator Excel Discussion (Misc queries) 4 July 14th 08 08:21 PM
editting a template kaja New Users to Excel 2 June 6th 08 10:29 PM
Editting xml format sheets stored in database. Martyn Excel Discussion (Misc queries) 0 April 1st 08 02:22 AM


All times are GMT +1. The time now is 02:50 AM.

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

About Us

"It's about Microsoft Excel"