Results 1 to 8 of 8

send image to image ctrl in userfrom using vba doesn't work

Threaded View

  1. #1
    Registered User
    Join Date
    01-09-2013
    Location
    Montreal, Quebec, Cnada
    MS-Off Ver
    Office 365 MSO 64 bits (16.0.12130.20272)
    Posts
    9

    Post send image to image ctrl in userfrom using vba doesn't work

    I am trying to find a way to display images, typically jpg files, into a ctrl in a userform in excell using vba. (using office365 64bits)

    I have tried using the loadpicture function :

    Me.image1.Picture = LoadPicture("E:\desktop\anyimage.jpg")
    but I get this error message : Run-Time error -2147418113 (8000fffff) : Method LoadPicture of object _Application failed

    And I also tried assigning the file directly without using the function :
    Me.image1.Picture ="E:\desktop\anyimage.jpg"
    but I get a filetype mismatch error


    Although I am not shure, it looks like the loadpicture() function maybe did work in previous excel versions.

    I have search everywhere to get an answer as to why it doesn not work and I found the 2 following answers :

    1. You can't use the LoadPicture method to set the Picture property of an image control. This method works with ActiveX controls only. To set the Picture property of an image control, simply assign to it a string specifying the file name and path of the desired graphic.

    2. VBA will not allow assignment of bitmap handles at runtime using LoadPicture() to ANY object that has a .Picture property.

    Yet, I find people in youtube that shows step by step procedure that does not work for me and for many others since I found many people looking to solve that problem.

    anyhelp would be greatly appreciated,
    Thank you
    Last edited by zsylvainz; 11-04-2019 at 10:50 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. VBA to cut image file path from word bookmark and replace with inserted image
    By JayRay1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-11-2018, 07:31 PM
  2. [SOLVED] Using a Userform to Browse image file then paste selected image to sheet?
    By matrixpom in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-05-2015, 05:42 PM
  3. Problem with image File Link in Cell not opening image for preview
    By Orada in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-24-2015, 09:33 AM
  4. [SOLVED] How to apply Image borders to an image that my excel vba userform pastes in a word doc?
    By CaptainCool in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 05-11-2014, 05:40 PM
  5. [SOLVED] data validadion doesn't work when worksheet is populated from userfrom??????
    By ciapul12 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2014, 03:53 PM
  6. [SOLVED] VBA to send embedded image in email body- NOT USING THE ORGINAL IMAGE SOURCE
    By Coreyusa in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-27-2013, 06:48 PM
  7. why does ctrl+v paste an image of the screen?
    By GingerMagician in forum Excel General
    Replies: 0
    Last Post: 04-16-2006, 10:25 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