Consulting

Results 1 to 2 of 2

Thread: Solved: Programatically Set Picture control Picture propert to "(None)"

  1. #1
    Microsoft Word MVP 2003-2009 VBAX Guru gmaxey's Avatar
    Joined
    Sep 2005
    Posts
    3,334
    Location

    Solved: Programatically Set Picture control Picture propert to "(None)"

    I've been polishing the cannon ball on a Word template Add-In that I am developing and one nagging issue is that I can't find a way to programatically remove a bitmap that is displayed on a userform picture contol.

    I have a listbox that lists all the image files in a folder. When the user clicks on a listed file the picture controls displays a preview. I recently added a feature that allows the user to "delete" the image file in its source folder. When this feature is executed the file is deleted and the list is refreshed but the image displayed in the picture control remains.

    The only thing I've been able to come up with is to set the control visible property to false when the form is displayed. Then when and image is selected in the list I toggle the visible property back to true and display the image. If the user deletes the image the i set the property back to false.

    I would like to leave the control displayed but remove (or set to "None') the picture property.

    Any ideas? Thanks.
    Greg

    Visit my website: http://gregmaxey.com

  2. #2
    Microsoft Word MVP 2003-2009 VBAX Guru gmaxey's Avatar
    Joined
    Sep 2005
    Posts
    3,334
    Location
    Doh!!

    Me.imgPreview.Picture = LoadPicture("")
    Greg

    Visit my website: http://gregmaxey.com

Posting Permissions

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