+ Reply to Thread
Results 1 to 15 of 15

Help with UserForm VBA

  1. #1
    Registered User
    Join Date
    06-16-2015
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    36

    Help with UserForm VBA

    Hello,

    I am in need of some help with userform VBA. If you choose to take on this task let me know what you need.

    Thanks for your help with this,

    Mark G
    Last edited by MG3; 03-03-2020 at 05:21 PM.

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,914

    Re: Help with UserForm VBA

    Don't have time for more right now but this will get you started.

    The code populates the StartTime combo and filters the listbox when a value is chosen in that combo.

    Please Login or Register  to view this content.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

  3. #3
    Registered User
    Join Date
    06-16-2015
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    36

    Re: Help with UserForm VBA

    Thank you Sir! Works great.
    Last edited by MG3; 03-03-2020 at 05:24 PM.

  4. #4
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,914

    Re: Help with UserForm VBA

    This one should cover it all.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    06-16-2015
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    36

    Re: Help with UserForm VBA

    Thank you for your time. Works absolutely great but how do I get it to populate the large list bx with the name selected along with the device number selected before submitting the info to the worksheet?

    How much do I owe you for your work on this?
    Last edited by MG3; 03-03-2020 at 05:24 PM.

  6. #6
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,914

    Re: Help with UserForm VBA

    Everthing works as per your instuctions sheet.

    Select StartTime, select Name, enter Device# and click checkout-button.

    You can enter 1 or more names and Device# per session.

    To delete an entry from bottom Listbox, select it and click Delete.

    The Edit-button isn't coded because that would require additional Textboxes and IMHO it's easier to delete a faulty entry and just create a new one from above Listbox.

    On clicking Submit-button all entries are written to Sheet.

    I've changed the layout from the bottom-Listbox to Landscape so you can see all info that's to be written to sheet.

    How much do I owe you for your work on this?
    This is a free forum but a click on the reputation star at the bottom left of one of my posts is always appreciated.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    06-16-2015
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    36

    Re: Help with UserForm VBA

    Sir I found a bug in your coding when I was running the model.

    Attachment 665311

    When I add more than 2 employees to the list bx then click submit it only adds 2 lines to the worksheet then I get the error msg.

    Mark
    Last edited by MG3; 03-03-2020 at 05:24 PM.

  8. #8
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,914

    Re: Help with UserForm VBA

    New version.

    1. Bug fixed
    2. ListBox clears after submitting.
    3. Edit button removed.
    4. Search Employee button removed since Listbox autfilters with every character entered in TextBox.
    5. MsgBox when no CheckIn # is found.
    6. Checkin Clear button removed since clearing is automatic now.

    Test it and let me know when if find new errors or want other improvements or changes.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    06-16-2015
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    36

    Re: Help with UserForm VBA

    Hello,

    Management would like couple changes. First have the txtbx "txtbxHandHeldNumber" unload itself when the Check Out Handheld button is pressed and just have the clear list button unload the list bx. Also you should see two Option buttons added that when someone is adding a new employee to the Employee sheet, they can add their name and their status as well.

    Thanks again for your time. MG3_HH2_rev3.2 file

    MG
    Last edited by MG3; 03-03-2020 at 05:21 PM.

  10. #10
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,914

    Re: Help with UserForm VBA

    Fixed as per requirement.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    06-16-2015
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    36

    Re: Help with UserForm VBA

    Thank you so much

  12. #12
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,914

    Re: Help with UserForm VBA

    You're welcome and thanks for rep+.

  13. #13
    Registered User
    Join Date
    06-16-2015
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    36

    Re: Help with UserForm VBA

    I have one last request. I noticed the txt bx to check in the handhelds that it only accepts a 3 digit number. We have devices from 1 to 140. The txtbx to check out the devices works great.

    Thanks

    MG
    Last edited by MG3; 03-03-2020 at 09:20 PM.

  14. #14
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,914

    Re: Help with UserForm VBA

    Change the code from this sub

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

    Please Login or Register  to view this content.

  15. #15
    Registered User
    Join Date
    06-16-2015
    Location
    Cincinnati
    MS-Off Ver
    2013
    Posts
    36

    Re: Help with UserForm VBA

    Works great thanks

+ 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] Userform inputs comparison with sheet cells and if true reset userform fields
    By aidan5800 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 08-08-2018, 04:51 PM
  2. Userform Combobox - select from list, store this as default each time userform loads
    By thecdnmole in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-19-2014, 07:48 AM
  3. combining chart userform and data transfer userform into 1 userform
    By H_Kennedy in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 01-04-2014, 07:11 AM
  4. combining chart userform and data transfer userform into 1 userform
    By H_Kennedy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-03-2014, 12:28 PM
  5. [SOLVED] Changed userform combobox to listbox, unable to get userform to retrieve datasheet values
    By dragonabsurdum in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-29-2013, 01:38 PM
  6. [SOLVED] Open a userform from a userform, but preserve the info in the original userform
    By jfoerch in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-25-2013, 02:38 PM
  7. userform is large.....how to use scrollbar of userform to show all of the userform
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-05-2010, 04:11 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