+ Reply to Thread
Results 1 to 5 of 5

How to capture an object name

  1. #1
    Registered User
    Join Date
    05-26-2006
    Location
    Ohio
    Posts
    17

    How to capture an object name

    In my worksheet I have a macro that will past pictures from a website into various cells.
    Is there a way to automatically capture the name of the picture that it just pastes? As you know it names each picture with a sequential number.
    I want to be able to have a macro that will delete a picture based on some criteria but can't see how to capture the name.
    Thanks in advance.
    Donald

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678
    Immediately after pasting, Selection.Name should provide what you need.

  3. #3
    Registered User
    Join Date
    05-26-2006
    Location
    Ohio
    Posts
    17
    I just tried that. I assume Selection.Name is used as "PicName = Selection.Name" in VB code. I get run time error 438, Object doesn't support this property or method. What am I missing? You can tell I'm a nivice.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello Reebot,

    Here is a function to return the last picture on the active sheet.
    Please Login or Register  to view this content.
    Siincerely,
    Leith Ross

  5. #5
    Registered User
    Join Date
    05-26-2006
    Location
    Ohio
    Posts
    17
    Thank you, I will give this a try.
    Donald

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Store Bitmap Object In Excel 2003 To Access Database?
    By Soar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-03-2008, 02:13 AM
  2. Delete Object when Object number unknown
    By inky in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-24-2008, 06:00 AM
  3. Selecting a picture object
    By Bope in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-02-2008, 12:36 PM
  4. Automatically Update An Inserted Object
    By Chard in forum Excel General
    Replies: 3
    Last Post: 05-21-2007, 06:23 AM
  5. How to delete an inserted object
    By bksanf01 in forum Excel General
    Replies: 2
    Last Post: 03-14-2007, 07:29 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1