Picture name

Qroozn

Well-known Member
Joined
Mar 12, 2002
Messages
543
how do i rename a picture inserted into excel.
i.e. default name is "picture 1".
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
Hi
Select your picture and rename it in the name box...
The name box is the combobox directly above column A on a default sheet.
Tom
 
Upvote 0
Thanks for that.. but i am trying to do it in a macro so that i can then set the size properties of the shape.

the problem is that each time i add a shape it gets a new number...
currently i am doing a
activesheet.pictures.insert
but i cant work out how to give it a new name
 
Upvote 0
On 2002-04-25 19:42, Qroozn wrote:

Thanks for that.. but i am trying to do it in a macro so that i can then set the size properties of the shape.

the problem is that each time i add a shape it gets a new number...
currently i am doing a
activesheet.pictures.insert
but i cant work out how to give it a new name

Would this help ?

<pre/>
Sub Name()
Dim Pict As Object

'// Note Inserts Picture Object @ Activecell and names it
Set Pict = ActiveSheet.Pictures.Insert("C:My DocumentsMy PicturesBALL01.PCX")
Pict.Name = "mypicture1"

End Sub
</pre>
 
Upvote 0
SOLUTION:

pict = folder & Frame & ext

Range("e6").Select
ActiveSheet.Pictures.Insert(pict).Select
Selection.Name = "picture 1"

Thanx Ivan. but i think i stole this from one of your old postings
 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,037
Members
448,543
Latest member
MartinLarkin

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top