Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Picture question

I have a shape on my spreadsheet - "Oval 1". I imported a picture of
a football. I discovered the name for the football is "Picture 200".
My question is, how can I rename "Picture 200" to "Football 1"?

meg99

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Picture question

Select the picture
Notice that the name of the picture appears in the NameBox (to the left of the
formula bar)

Type the new name in the NameBox and remember to hit enter when you're done.

meg99 wrote:

I have a shape on my spreadsheet - "Oval 1". I imported a picture of
a football. I discovered the name for the football is "Picture 200".
My question is, how can I rename "Picture 200" to "Football 1"?

meg99


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Picture question

On Nov 6, 9:12 am, Dave Peterson wrote:
Select the picture
Notice that the name of the picture appears in the NameBox (to the left of the
formula bar)

Type the new name in the NameBox and remember to hit enter when you're done.

meg99 wrote:

I have a shape on my spreadsheet - "Oval 1". I imported a picture of
a football. I discovered the name for the football is "Picture 200".
My question is, how can I rename "Picture 200" to "Football 1"?


meg99


--

Dave Peterson


Thanks Dave. I can change the number so that Picture 200 becomes
Picture 1, but I can't change it to FootBall 1. I have a number of
other pictures and I would like to name them appropriately so I can
manipulate them in code without trying to remember the number. Is
that possible?

meg99

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Picture question

On Nov 6, 10:23 am, meg99 wrote:
On Nov 6, 9:12 am, Dave Peterson wrote:





Select the picture
Notice that the name of the picture appears in the NameBox (to the left of the
formula bar)


Type the new name in the NameBox and remember to hit enter when you're done.


meg99 wrote:


I have a shape on my spreadsheet - "Oval 1". I imported a picture of
a football. I discovered the name for the football is "Picture 200".
My question is, how can I rename "Picture 200" to "Football 1"?


meg99


--


Dave Peterson


Thanks Dave. I can change the number so that Picture 200 becomes
Picture 1, but I can't change it to FootBall 1. I have a number of
other pictures and I would like to name them appropriately so I can
manipulate them in code without trying to remember the number. Is
that possible?

meg99- Hide quoted text -

- Show quoted text -


Another problem. After renaming Picture 200 to Picture 1, I now
notice that when I copy Picture 1 I get another Picture 1 instead of
Picture 2.
Before, when I had Pictrue 200, I could copy it and get Picture 201.

The app I am creating deletes all pictures except Picture 1 and then
copies Picture 1 at a computed cell. If all of the Pictures are
Picture 1, none of them get deleted.

Any clues?

meg99

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Picture question

Perhaps one of these will do the trick?

Public Sub ReNamePics()
'select all pictures then run
Dim Pic As Shape, K As Long
For Each Pic In Selection.ShapeRange
Pic.Name = Pic.Name & Pic.Name
Next Pic
For Each Pic In Selection.ShapeRange
K = K + 1
Pic.Name = "Football" & K
Next Pic
End Sub

Sub Rename_Pics22()
'select all pictures then rename with a list starting at A2
Dim Pic As Shape
Dim rng As Range
Dim i As Integer
On Error GoTo endit
Set rng = Range("A2")
For Each Pic In Selection.ShapeRange
Pic.Name = rng.Offset(i, 0).Value
i = i + 1
Next Pic
Exit Sub
endit:
MsgBox "there is a picture by that name, re-type a name"
End Sub


Gord Dibben MS Excel MVP

On Tue, 06 Nov 2007 08:23:53 -0800, meg99 wrote:

Thanks Dave. I can change the number so that Picture 200 becomes
Picture 1, but I can't change it to FootBall 1. I have a number of
other pictures and I would like to name them appropriately so I can
manipulate them in code without trying to remember the number. Is
that possible?




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Picture question

Try it again. You should be able to use that name. Remember to hit enter after
you type in the new name in the namebox.



meg99 wrote:
<<snipped

Thanks Dave. I can change the number so that Picture 200 becomes
Picture 1, but I can't change it to FootBall 1. I have a number of
other pictures and I would like to name them appropriately so I can
manipulate them in code without trying to remember the number. Is
that possible?

meg99


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Picture question

I like to use a unique name based on the topleftcell of the picture.

with worksheets("sheetnamehere")
'the last picture added
with .pictures(.pictures.count)
.name = "Pict_" & .topleftcell.address(0,0)
end with
end with

If that doesn't help, you may want to share more of your code.

Or maybe you can put the picture on a hidden sheet. Then you can delete all the
pictures and copy the single picture from that hidden sheet.

ps. You may have noticed that most people in the MS public excel newsgroups are
top posters.


meg99 wrote:

<<snipped

Another problem. After renaming Picture 200 to Picture 1, I now
notice that when I copy Picture 1 I get another Picture 1 instead of
Picture 2.
Before, when I had Pictrue 200, I could copy it and get Picture 201.

The app I am creating deletes all pictures except Picture 1 and then
copies Picture 1 at a computed cell. If all of the Pictures are
Picture 1, none of them get deleted.

Any clues?

meg99


--

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
picture and data question Dave Gerecke New Users to Excel 2 January 20th 08 04:18 PM
Short question:Background picture in excel FloggingDolphin Excel Programming 1 June 30th 05 10:49 PM
Word Picture Object question Stuart[_5_] Excel Programming 0 July 5th 04 07:10 PM
Insert Picture in Worksheet Question Adresmith Excel Programming 2 May 5th 04 03:51 PM
Simple Insert Picture question Paul Excel Programming 1 September 15th 03 08:37 PM


All times are GMT +1. The time now is 04:39 PM.

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"