Load oleobject into an image box in excel vba RRS feed

  • Question

  • I have several oleobjects that are image files (.jpg, .bmp, .gif) on a worksheet.  I want to load/display these oleobjects in an image box that is also on the worksheet.  How do I do this?  The only code I've found loads images from a filepath.  Thanks.
    Dim image As Variant 
    image = ThisWorkbook.Path & "\sun.jpg" 
    Sheets("Sheet1").Image1.Picture = LoadPicture(image)
    Monday, November 3, 2014 1:21 AM