PC Review


Reply
Thread Tools Rate Thread

Create shape, name shape, add text to shape

 
 
Rick S.
Guest
Posts: n/a
 
      26th Feb 2010
Hi, I decided to burst as many brain cells as I can working with shapes.
Its working.

I am trying to add "Oval" shapes (msoShapeOval) tn image on a worksheet, the
problem I am having difficulties with is naming the shape or renaming the
shape as it is created.
I want to start with "Oval 1" for the First shape and continu counting, Oval
2, Oval 3, etc. What I get is what seems to be a random starting shape name
such as "Oval 6" when there are no shapes other than a picture shape on the
sheet or in the entire workbook.
Lets say It started with "Oval 6", I rename to "Oval 1" the next shape name
is going to be "Oval 7" by default; I can rename to "Oval 2" and so on until
I reach "Oval 12" and try to rename to "Oval 6". Instead of renaming it jumps
to the original "Oval 6" shape which was renamed to "Oval 1"?

1. Can I purge shapes from a worksheet or workbook?
2. How do I get the count to start where I want it to start at with out
duplicating the name?

--
Regards

Rick
 
Reply With Quote
 
 
 
 
ker_01
Guest
Posts: n/a
 
      26th Feb 2010
Set Disc = .AddShape(msoShapeOval, LimitLeft, TopShape, HeightShape,
HeightShape)
With Disc
.Fill.ForeColor.RGB = ColorBackground
.Line.Visible = msoFalse
.ZOrder msoSendToBack
.Name = "Oval 12"
End With

Note that if another shape named "Oval 12" exists you might have to code to
find it and rename it before creating this shape, but since you said that
there were no other shapes, this should work for you.

"Rick S." wrote:

> Hi, I decided to burst as many brain cells as I can working with shapes.
> Its working.
>
> I am trying to add "Oval" shapes (msoShapeOval) tn image on a worksheet, the
> problem I am having difficulties with is naming the shape or renaming the
> shape as it is created.
> I want to start with "Oval 1" for the First shape and continu counting, Oval
> 2, Oval 3, etc. What I get is what seems to be a random starting shape name
> such as "Oval 6" when there are no shapes other than a picture shape on the
> sheet or in the entire workbook.
> Lets say It started with "Oval 6", I rename to "Oval 1" the next shape name
> is going to be "Oval 7" by default; I can rename to "Oval 2" and so on until
> I reach "Oval 12" and try to rename to "Oval 6". Instead of renaming it jumps
> to the original "Oval 6" shape which was renamed to "Oval 1"?
>
> 1. Can I purge shapes from a worksheet or workbook?
> 2. How do I get the count to start where I want it to start at with out
> duplicating the name?
>
> --
> Regards
>
> Rick

 
Reply With Quote
 
Herbert Seidenberg
Guest
Posts: n/a
 
      27th Feb 2010
Excel 2007 Shape names
BGA example:
http://c0718892.cdn.cloudfiles.racks.../02_11_10.xlsm

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I resize shape in powerpoint (resizing collapses the shape jmmarq4 Microsoft Powerpoint 2 18th Feb 2010 08:00 AM
click on shape, not just text in shape Duane Microsoft Powerpoint 4 20th Nov 2008 10:35 PM
Shape (unknown member) : Invalidid request. To select a shape, its view must be active. Josh Sale Microsoft Powerpoint 3 9th May 2008 12:14 AM
PowerPoint events for adding a shape, deleting a shape and slide Mark Kestenbaum Microsoft Powerpoint 1 3rd Jan 2008 12:04 AM
my curser changed from arrow shape to a cross shape???? =?Utf-8?B?Ymo=?= Microsoft Excel New Users 1 5th Feb 2007 02:47 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:43 AM.