Results 1 to 4 of 4

Thread: open image in the userform based upon the condition

  1. #1

    open image in the userform based upon the condition



    Register for a FREE account, and/
    or Log in to avoid these ads!

    Hi,
    Does any one knows how to show the image in the right hand side of the userform based upon the condition.
    Say example,
    i have userform with following list
    1. Name (combobox)
    2. Age (will come automatically based upon the name selection)
    3. Occupation (will show automatically based upon the name selection)
    I would like to create a picture box in the right hand side of the userform which shows the image for the respective name. ( i have more than 30 names).
    Please help me guys,
    Thanks

  2. #2
    Conjurer snb's Avatar
    Join Date
    May 2013
    Posts
    374
    Articles
    0
    Excel Version
    2020
    Why don't you help us by posting a sample workbook ?

  3. #3
    Conjurer WizzardOfOz's Avatar
    Join Date
    Sep 2013
    Location
    Australia
    Posts
    184
    Articles
    0
    Excel Version
    Office 365
    Try this.
    Need a full path and filename
    Also not all image types are supported

    Code:
    Private Sub ComboBox1_Change()
        Image1.Picture = LoadPicture("C:\temp\" & ComboBox1.Text & ".gif")
    End Sub

  4. #4

Posting Permissions

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