+ Reply to Thread
Results 1 to 6 of 6

Userform picture display on click event

  1. #1
    Registered User
    Join Date
    06-22-2015
    Location
    London,England
    MS-Off Ver
    2010
    Posts
    10

    Userform picture display on click event

    Hi all,
    New to this forum and new to VBA (not another newbie I here you all cry)!
    I am self teaching myself to create userform inspection sheets for my quality control procedures in work.
    I have a userform that has a textbox where the operator can enter a customer part number and when he hits the command button next to the box I would like the corresponding diagram of the part to be displayed in an image control box on the form to enable better inpection to be done.

    In my spreadsheet I have 3 simple columns.

    Column A is the part number
    Column B is the description
    Column C is the full file path for the image on my "C" drive.

    If someone could just point me in the general direction of the coding for the click event to load the picture then I am sure I can muddle it through from there.

    I am sure something like this has been done before but I just cant seem to find it.

    There could be up to 150 seperate part numbers eventually each having its own drawing.

    Thanks for any help out there
    Nick

  2. #2
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Userform picture display on click event

    Nick

    Instead of using a textbox why not use a combobox that lists the part number and description?

    That could be populated like this.
    Please Login or Register  to view this content.
    You could then use the combobox's change event to load the image.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Registered User
    Join Date
    06-22-2015
    Location
    London,England
    MS-Off Ver
    2010
    Posts
    10

    Re: Userform picture display on click event

    Thanks
    I had thought of that and I do have a solution similar to what you have posted.
    However I feel that once the combo box gets really long it will be quite a chore to plough through to find the correct part number and there is always the instance of choosing the wrong one from a long dropdown box.
    I just felt that if the operator could enter the part number in a text box, it would make things a little quicker for them to use and I wouldn't get the grief down the line!
    Nick

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,644

    Re: Userform picture display on click event

    Try this then.
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-22-2015
    Location
    London,England
    MS-Off Ver
    2010
    Posts
    10

    Re: Userform picture display on click event

    Fantastic,
    I will give it a go.
    Best wishes
    Nick

  6. #6
    Registered User
    Join Date
    06-22-2015
    Location
    London,England
    MS-Off Ver
    2010
    Posts
    10

    Re: Userform picture display on click event

    Fantastic
    I couldnt have asked for anything better
    Thank you so much
    Regards
    Nick

+ 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. [SOLVED] Call userform control click event indirectly
    By ryan.wherry in forum Excel Programming / VBA / Macros
    Replies: 18
    Last Post: 03-26-2015, 11:42 AM
  2. [SOLVED] Using picture to display table from worksheet on userform; need help modifying picture
    By adamstarr12 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-19-2014, 10:34 AM
  3. Display Picture on userform on click
    By Benjamin2008 in forum Excel General
    Replies: 6
    Last Post: 12-19-2013, 05:41 AM
  4. [SOLVED] userform label double-click goes to click event
    By John Paul Fullerton in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-19-2006, 01:00 PM
  5. What event to detect click on UserForm ListBox?
    By Don Wiss in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-26-2005, 06:05 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