PC Review


Reply
Thread Tools Rate Thread

how do i rename an autoshape object so i can use it in vb program

 
 
FrankD
Guest
Posts: n/a
 
      3rd Apr 2009

 
Reply With Quote
 
 
 
 
Rick Rothstein
Guest
Posts: n/a
 
      4th Apr 2009
You might want to provide more details of what you are looking for (hint... use the large white space in the message area of your posting).

--
Rick (MVP - Excel)
 
Reply With Quote
 
JLGWhiz
Guest
Posts: n/a
 
      4th Apr 2009
I don't know if this will help, but let's say you select an octagon from the
autoshape objects and it is the only autoshape on the sheet.

Sub dkd()
Sheets(1).Shapes("AutoShape 1").Name = "Stop"
MsgBox Selection.Name
End Sub

The above code would rename the shape from AutoShape 1 to Stop.


"FrankD" <(E-Mail Removed)> wrote in message
news0D9CB7F-9D00-4837-B88D-(E-Mail Removed)...
>



 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      4th Apr 2009
For intTemp = 1 To ActiveSheet.Shapes.Count
ActiveSheet.Shapes(intTemp).Name = "ShapeName"
Next

If this post helps click Yes
---------------
Jacob Skaria


 
Reply With Quote
 
Rick Rothstein
Guest
Posts: n/a
 
      4th Apr 2009
??? You can't rename all the shapes with the same name. At minimum, you
would have to do your code something like this I would think...

ShapeNames = Array("FirstName", "SecondName", "ThirdName")
For intTemp = LBound(ShapeNames) To UBound(ShapeNames)
ActiveSheet.Shapes(intTemp + 1).Name = ShapeNames(intTemp)
Next

But I'm not 100% sure that is what the OP is after; hence my request for
clarification (and my 'gentle' nudge for him to not use the Subject line to
ask his question).

--
Rick (MVP - Excel)


"Jacob Skaria" <(E-Mail Removed)> wrote in message
news:19412B96-21B5-4A4A-9E3F-(E-Mail Removed)...
> For intTemp = 1 To ActiveSheet.Shapes.Count
> ActiveSheet.Shapes(intTemp).Name = "ShapeName"
> Next
>
> If this post helps click Yes
> ---------------
> Jacob Skaria
>
>


 
Reply With Quote
 
Jacob Skaria
Guest
Posts: n/a
 
      4th Apr 2009
Hi Rick

I should have mentioned that as <sheetname> instead of "sheetname" to convey
the message that it is a variable which needs to be passed.

If this post helps click Yes
---------------
Jacob Skaria


"Rick Rothstein" wrote:

> ??? You can't rename all the shapes with the same name. At minimum, you
> would have to do your code something like this I would think...
>
> ShapeNames = Array("FirstName", "SecondName", "ThirdName")
> For intTemp = LBound(ShapeNames) To UBound(ShapeNames)
> ActiveSheet.Shapes(intTemp + 1).Name = ShapeNames(intTemp)
> Next
>
> But I'm not 100% sure that is what the OP is after; hence my request for
> clarification (and my 'gentle' nudge for him to not use the Subject line to
> ask his question).
>
> --
> Rick (MVP - Excel)
>
>
> "Jacob Skaria" <(E-Mail Removed)> wrote in message
> news:19412B96-21B5-4A4A-9E3F-(E-Mail Removed)...
> > For intTemp = 1 To ActiveSheet.Shapes.Count
> > ActiveSheet.Shapes(intTemp).Name = "ShapeName"
> > Next
> >
> > If this post helps click Yes
> > ---------------
> > Jacob Skaria
> >
> >

>
>

 
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
making a huge autoshape object =?Utf-8?B?UmFuZHkgUGVyc29u?= Microsoft Powerpoint 6 30th Sep 2006 12:34 PM
Rename autoshape Mark Stephens Microsoft Excel Misc 2 2nd Apr 2005 11:47 PM
Microsoft Powerpoint AutoShape / object structure sahu Microsoft Dot NET Framework 1 12th Aug 2003 12:54 PM
Microsoft Powerpoint AutoShape / object structure sahu Microsoft VB .NET 1 12th Aug 2003 12:54 PM
Microsoft Powerpoint AutoShape / object structure sahu Microsoft C# .NET 1 12th Aug 2003 12:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:28 PM.