+ Reply to Thread
Results 1 to 15 of 15

pass picture

  1. #1
    Registered User
    Join Date
    10-08-2014
    Location
    iraq
    MS-Off Ver
    2010
    Posts
    42

    pass picture

    how can pass picture from cell in sheet to user form text box or image

  2. #2
    Forum Expert MickG's Avatar
    Join Date
    11-23-2007
    Location
    Banbury,Oxfordshire
    Posts
    2,650

    Re: pass picture

    Copy picture:- "Ctrl + C"
    Open Userform in design mode, Right click "Image Control", select "Properties", scroll down to "Picture", paste in row to right :- "Ctrl +V"

  3. #3
    Registered User
    Join Date
    10-08-2014
    Location
    iraq
    MS-Off Ver
    2010
    Posts
    42

    Re: pass picture

    i need with cod please

  4. #4
    Registered User
    Join Date
    10-08-2014
    Location
    iraq
    MS-Off Ver
    2010
    Posts
    42

    Re: pass picture

    is there any solution please?

  5. #5
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: pass picture

    perhaps you can provide mode detail about the real location of the picture.
    Cells can not contain images. So the image might be the worksheet background image, or an image in the cells comment , or the fill of a shape.

    The PastePicture file on Stephen Bullen's page may help.
    http://www.oaltd.co.uk/Excel/Default.htm

    If the picture is held in an activex control you should be able to use the Picture property.
    Cheers
    Andy
    www.andypope.info

  6. #6
    Registered User
    Join Date
    10-08-2014
    Location
    iraq
    MS-Off Ver
    2010
    Posts
    42

    Re: pass picture

    i have tabel in sheet contain names degrees and pictures for the students
    then i lookup for any name with index gived me the name and degree and the picture
    i wont to pass what i looked (name , degree, pic) to the user form .....from the celles in the sheet that contain name degree and picture

    i passed the name and the degree to the user form from sheet but i codnt with the pic
    please help

    i dont wont right path of pic in the drive ... i wont passed it from the table from cells
    Last edited by lulua; 11-29-2014 at 06:04 AM.

  7. #7
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: pass picture

    So not images but name of the image file that is stored on disk? If so you can use the LoadPicture method to display the image via the .Picture property of the image control

  8. #8
    Registered User
    Join Date
    10-08-2014
    Location
    iraq
    MS-Off Ver
    2010
    Posts
    42

    Re: pass picture

    so i cant pass picturs that was in cells ???
    just with path name in drive?????

  9. #9
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: pass picture

    Post example as it is not clear, to me at least, where this image is being stored in.

    You can get the image out of certain containers, such as shapes and activex controls, as I said and provided link for.

  10. #10
    Registered User
    Join Date
    10-08-2014
    Location
    iraq
    MS-Off Ver
    2010
    Posts
    42

    Re: pass picture

    look file pass
    i wont when i write n in textbox1 the pic that was in the tabel in cell j2 pass to user form
    Attached Files Attached Files

  11. #11
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: pass picture

    Uses the pastepicture code I suggested earlier
    Attached Files Attached Files

  12. #12
    Registered User
    Join Date
    10-08-2014
    Location
    iraq
    MS-Off Ver
    2010
    Posts
    42

    Re: pass picture

    when i enter n or d its gived me the same picture

    look columns h , i , j there was aformula that the textboxs depend on it

  13. #13
    Registered User
    Join Date
    10-08-2014
    Location
    iraq
    MS-Off Ver
    2010
    Posts
    42

    Re: pass picture

    is there any solution??

  14. #14
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    O365
    Posts
    20,419

    Re: pass picture

    The index value for the shape was wrong.

    Please Login or Register  to view this content.
    To avoid confusion you could rename the shapes to have non unicode names which you could then reference in the vba code.

  15. #15
    Registered User
    Join Date
    10-08-2014
    Location
    iraq
    MS-Off Ver
    2010
    Posts
    42

    Re: pass picture

    thank u very very much Andy Pope

+ 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. Forward Pass and Backward Pass calculations
    By DesperateKid in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-19-2014, 06:31 PM
  2. Click on picture and run macro to replace existing picture with selected picture file
    By houseflipsheet in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-14-2014, 12:02 AM
  3. Use if statement for a range +4 and -4 and write PASS / NOT PASS
    By alexistkd in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-05-2013, 07:11 PM
  4. Replies: 3
    Last Post: 06-07-2012, 07:25 PM
  5. [SOLVED] Analyze Within An Array and Pass Back Once vs. Pass at each applicable Instance
    By AlvaroSiza in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-11-2012, 05:25 PM

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