Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default How to retrieve the name of a picture within a worksheet?

How can I find out or edit the object name of a picture that I have added as
a picture file on a worksheet ?

Oscar


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default How to retrieve the name of a picture within a worksheet?

Depends on what the picture is. If it is a picture object (if you did
insert=Picture = from file it would be)


Activesheet.Pictures(1).Name

--
Regards,
Tom Ogilvy


Oscar wrote in message
ll.nl...
How can I find out or edit the object name of a picture that I have added

as
a picture file on a worksheet ?

Oscar




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default How to retrieve the name of a picture within a worksheet?

Hi Oscar,
Only I know is looping...


Code
-------------------

Const msoPicture As Long = 13
Dim obj As Object
For Each obj In ActiveSheet.Shapes
If obj.Type = msoPicture Then
MsgBox obj.Name
End If
Next

-------------------


--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 691
Default How to retrieve the name of a picture within a worksheet?

This is looping to find the cell at a specific location:
Dave Peterson, posted in programming, 2002-06-16

Sub testme3()
Dim myCell As Range, myShape As Shape
Set myCell = Range("A1")
For Each myShape In ActiveSheet.Shapes
If Intersect(myShape.TopLeftCell, myCell) Is Nothing Then
'do nothing
Else
MsgBox myShape.Name
Exit For
End If
Next myShape
End Sub

Some other possibilities such as name of shapes in a selection,
and additonal information on Shapes can be found in
http://www.mvps.org/dmcritchie/excel/shapes.htm
--
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm

"Colo " wrote in message ...
Hi Oscar,
Only I know is looping...


Code:
--------------------

Const msoPicture As Long = 13
Dim obj As Object
For Each obj In ActiveSheet.Shapes
If obj.Type = msoPicture Then
MsgBox obj.Name
End If
Next

--------------------



---
Message posted from http://www.ExcelForum.com/



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
How can i retrieve a worksheet from another workbook using VBA CWay Excel Discussion (Misc queries) 2 April 14th 09 05:52 PM
I NEED TO USE A LOOKUP FUNCT. TO RETRIEVE A PICTURE FROM A HYPERL WERNER SLABBERT Excel Worksheet Functions 1 September 4th 08 03:47 PM
retrieve data from worksheet Dennis Excel Worksheet Functions 0 January 20th 08 07:33 PM
how do i retrieve a deleted worksheet Deleted worksheet from Excel New Users to Excel 2 October 13th 07 10:18 PM
How to extract a picture from an Excel worksheet into a picture fi SARANJAI Excel Discussion (Misc queries) 10 June 12th 05 05:00 AM


All times are GMT +1. The time now is 05:17 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"