+ Reply to Thread
Results 1 to 5 of 5

Insert filename into cell after importing picture

  1. #1
    Registered User
    Join Date
    04-03-2010
    Location
    Orlando, FL
    MS-Off Ver
    Office 365
    Posts
    94

    Insert filename into cell after importing picture

    Hi all,

    I have the following code that imports a picture into a worksheet:

    Please Login or Register  to view this content.
    What I'd like to do is to be able to have a cell under the imported picture contain the filename. Any help on this is greatly appreciated...
    Last edited by wpryan; 07-03-2010 at 06:49 PM. Reason: solved

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Insert filename into cell after importing picture

    wpryan
    mypicture is the full path and file name

    so.....

    Please Login or Register  to view this content.
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    04-03-2010
    Location
    Orlando, FL
    MS-Off Ver
    Office 365
    Posts
    94

    Re: Insert filename into cell after importing picture

    Thanks Pike, it's working great. I wonder if you would do two addional things, that is.
    1/ explain step-by-step what the code does, I'm trying to improve my knowledge and
    2/ I'd like it if, should the picture be deleted, then the filename also be deleted?
    Sorry for the bother, and thanks again!

  4. #4
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Insert filename into cell after importing picture

    dude,
    Please Login or Register  to view this content.
    to see it work use the debug.print and view results in the "immediate window"
    Please Login or Register  to view this content.
    to clear the name something like..
    Please Login or Register  to view this content.
    in a change sheet event but it depends on the worksheet shapes Quantity

  5. #5
    Registered User
    Join Date
    04-03-2010
    Location
    Orlando, FL
    MS-Off Ver
    Office 365
    Posts
    94

    Re: Insert filename into cell after importing picture

    thanks again for your help and explanation. The clearcontents command can work on one of my worksheets because only one picture is uploaded. Another, however, has 3 pictures uploaded so this is a bit more complicated. In any case it's mitigated because if one deletes the image and then uploads another, then the contents of the cell is replaced, and the form itself has another macro built in where on open data fields and pictures are cleared.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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