Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Old July 24th 08, 09:08 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Feb 2008
Posts: 100
Default Manually changing a picture (shape) name property

I've got several bitmaps pasted on Sheet1 that I need to refer to in VBA.
However, I'm having trouble figuring out which is which. I'd like to name
each with something easy to remember, but when I bring up the properties tab
(even when the picture is selected) it gives me the worksheet properties and
not the picture properties.

I tried cycling through the images with VBA (thinking I could figure out
which was which and assign names through code) but it is telling me there
are more pictures than actually exist on the sheet, which makes me think
that Excel considers the extra pictures I deleted to still be present- which
makes it even harder to figure out which are which.

So, can anyone tell me how to find and change the name property of a
shape/picture?

Thanks!
Keith



  #2   Report Post  
Old July 24th 08, 09:35 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 11,058
Default Manually changing a picture (shape) name property

The first loop list the old names. The second loop assigns new names:

Sub Macro1()
newname = Array("Alpha", "Beta", "Gamma")
Dim sh As Shape

For Each sh In ActiveSheet.Shapes
MsgBox (sh.Name)
Next

For i = 0 To 2
ActiveSheet.Shapes(i + 1).Name = newname(i)
Next
End Sub
--
Gary''s Student - gsnu2007j


"ker_01" wrote:

I've got several bitmaps pasted on Sheet1 that I need to refer to in VBA.
However, I'm having trouble figuring out which is which. I'd like to name
each with something easy to remember, but when I bring up the properties tab
(even when the picture is selected) it gives me the worksheet properties and
not the picture properties.

I tried cycling through the images with VBA (thinking I could figure out
which was which and assign names through code) but it is telling me there
are more pictures than actually exist on the sheet, which makes me think
that Excel considers the extra pictures I deleted to still be present- which
makes it even harder to figure out which are which.

So, can anyone tell me how to find and change the name property of a
shape/picture?

Thanks!
Keith



  #3   Report Post  
Old July 24th 08, 09:44 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Jul 2006
Posts: 35,218
Default Manually changing a picture (shape) name property

Manually...

You could select the picture, then look at the namebox (to the left of the
formula bar). You'll see the old name. You can type the new name in that
namebox (and hit enter to confirm your change).



ker_01 wrote:

I've got several bitmaps pasted on Sheet1 that I need to refer to in VBA.
However, I'm having trouble figuring out which is which. I'd like to name
each with something easy to remember, but when I bring up the properties tab
(even when the picture is selected) it gives me the worksheet properties and
not the picture properties.

I tried cycling through the images with VBA (thinking I could figure out
which was which and assign names through code) but it is telling me there
are more pictures than actually exist on the sheet, which makes me think
that Excel considers the extra pictures I deleted to still be present- which
makes it even harder to figure out which are which.

So, can anyone tell me how to find and change the name property of a
shape/picture?

Thanks!
Keith


--

Dave Peterson
  #4   Report Post  
Old July 25th 08, 12:57 PM posted to microsoft.public.excel.misc
external usenet poster
 
First recorded activity by ExcelBanter: Feb 2008
Posts: 100
Default Manually changing a picture (shape) name property

Wow, that's cool. I wonder how I never learned that before.
Many thanks!
Keith

"Dave Peterson" wrote in message
...
Manually...

You could select the picture, then look at the namebox (to the left of the
formula bar). You'll see the old name. You can type the new name in that
namebox (and hit enter to confirm your change).



ker_01 wrote:

I've got several bitmaps pasted on Sheet1 that I need to refer to in VBA.
However, I'm having trouble figuring out which is which. I'd like to name
each with something easy to remember, but when I bring up the properties
tab
(even when the picture is selected) it gives me the worksheet properties
and
not the picture properties.

I tried cycling through the images with VBA (thinking I could figure out
which was which and assign names through code) but it is telling me there
are more pictures than actually exist on the sheet, which makes me think
that Excel considers the extra pictures I deleted to still be present-
which
makes it even harder to figure out which are which.

So, can anyone tell me how to find and change the name property of a
shape/picture?

Thanks!
Keith


--

Dave Peterson





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
changing property of a picture that is already pasted on excel cc New Users to Excel 0 June 27th 06 05:04 AM
Error setting shape text property Sarge Charts and Charting in Excel 2 January 11th 06 03:31 AM
Legends - Changing the Shape of Paul Charts and Charting in Excel 2 January 4th 06 12:22 PM
Capturing Shape Name/Text from OnAction property William Bartusek Excel Discussion (Misc queries) 3 April 12th 05 06:38 PM
Why oh why are my comment boxes changing shape? Marc New Users to Excel 1 April 1st 05 03:54 AM


All times are GMT +1. The time now is 03:46 AM.

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

About Us

"It's about Microsoft Excel"

 

Copyright © 2017