PDA

View Full Version : Is it Possible to name the picture as filename instead of picture1



karenros
11-25-2008, 11:06 AM
When i insert a picture on excel it is inserted as Picture 1 and if i add another one it is Picture2.. so suppose if i delete picture 1 can the next picture named to Picture1.


Or is it possible to add have the filename instead of the Picture1 when getting the picture into excel.


Thanks,
Karen

Simon Lloyd
11-25-2008, 11:40 AM
If deleting and adding in the same session then it will not be possible to have the picture name cascade back i.e from Picture2 to Picture1. When you have inserted the picture it is selected so you can simply use:

Selection.Name= Filenamesubstitute Filename for the actual filename or variable used to house the name.

karenros
11-25-2008, 11:44 AM
If deleting and adding in the same session then it will not be possible to have the picture name cascade back i.e from Picture2 to Picture1. When you have inserted the picture it is selected so you can simply use:

Selection.Name= Filenamesubstitute Filename for the actual filename or variable used to house the name.

So does that mean in my excel spread sheet insteat of Picture1 it would be whatever.jpg. or to make it more clear if i select the image in excel instead of saying picture1 it would say whatever.jpg.

Simon Lloyd
11-25-2008, 11:49 AM
In the Name Box next to the formula bar it would show the name you gave it, you can then go straight to the item by selecting the name in this box or you can then reference the name in VBA...etc

karenros
11-25-2008, 12:10 PM
Thanks a lot bob.... that did it...

Simon Lloyd
11-25-2008, 12:15 PM
Bob?

karenros
11-25-2008, 12:18 PM
oops.. Simon...Have been a lot of forums today... sorry about the confusion..

Any ways thanks a lot a Simon

Simon Lloyd
11-25-2008, 12:36 PM
Karenos, if you are posting the same question in other forums you must post a link to those forums, read the link in my signature as to why!

karenros
11-25-2008, 12:55 PM
No i didnt post this question in any other forum..I am a .net programmer