+ Reply to Thread
Results 1 to 4 of 4

Rest button to clear a changing image (which is dependent on a drop down selection)

  1. #1
    Registered User
    Join Date
    09-06-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    69

    Rest button to clear a changing image (which is dependent on a drop down selection)

    Hello again,

    I have a Userform with a clear button I am trying to code to clear all of the contents entered on the form (which has yet to be be submitted to the spreadsheet).

    The clear button is circled in orange.

    Form - clear.JPG


    It all works with the exception of clearing the conditional photo (the photo changes according to the employee selected in the drop down combobox on the form).

    Here is my code- can someone help me get the button to clear the photo too?..

    Within the form code is:

    The code changes the image of the employee depending on the employee selected on the drop down (I have a list of JPGs in the same folder with the same employee names).

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    End Sub


    And within the module the function is:


    Please Login or Register  to view this content.
    The code above clears everything with the exception of the photo if an employee is selected in the form. Can someone provide me with the code to clear the photo alone- without causing errors - and where to place within the existing function?...

    Maybe something like?...


    Image2.Picture = Nothing

    'WorkSchedule.Image2.Picture = LoadPicture("")


  2. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Rest button to clear a changing image (which is dependent on a drop down selection)

    You'll probably find your second guess would work if you tried it.
    Last edited by cytop; 02-25-2017 at 06:51 AM. Reason: Typos, using a phone

  3. #3
    Registered User
    Join Date
    09-06-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    69

    Re: Rest button to clear a changing image (which is dependent on a drop down selection)

    Quote Originally Posted by cytop View Post
    Yours probably find your second guess would work if you tried it.

    Ok, but how does that fit into the code exactly? I have tried but it is not working for me...

  4. #4
    Registered User
    Join Date
    09-06-2016
    Location
    UK
    MS-Off Ver
    2016
    Posts
    69

    Re: Rest button to clear a changing image (which is dependent on a drop down selection)

    Ok, problem resolved. Thank you all for your input!

+ 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] Clear up to three dependent drop down lists based on selection in superior drop down list
    By theletterh in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-04-2016, 09:31 PM
  2. [SOLVED] Clear Dependent Cell After changing option
    By lonleysoul in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-07-2016, 10:28 AM
  3. How do you insert images from a dependent drop down list using vba ?
    By QuintonMcCloud in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-28-2015, 10:06 AM
  4. Control boxes dependent on selection in drop down box
    By Carolin92 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-17-2015, 02:26 AM
  5. Post drop down selection in html data dependent on drop down is not coming
    By wfm007 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-05-2015, 08:57 AM
  6. [SOLVED] The VBA code to auto-clear dependent drop down selection when parent cell change.
    By Hotgirl in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-29-2012, 07:48 PM
  7. [SOLVED] Clear Dependent Drop Down Lists
    By Ambassador777 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-03-2012, 11:38 PM

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