+ Reply to Thread
Results 1 to 12 of 12

[SOLVED] Excel Userform checklist with date and userid

  1. #1
    Registered User
    Join Date
    09-14-2016
    Location
    India
    MS-Off Ver
    2007
    Posts
    10

    [SOLVED] Excel Userform checklist with date and userid

    Hi All,

    I am new to VBA coding and Trying to create Excel form based checklist which can pull Date and and user id of system.

    We have different different teams and they have particular task and due date for each task.

    If i select any task and press complete then in front of that task User ID and Date should get populated. if task completion cross the due date it should ask reason for late.

    Completion and reviewer should not same then msgbox "Processor and can not be same"

    Same goes with 2 Review

    Currently I am using this code to get userid and date in D6 cell but how i can link it to task which is selected in listbox for getting output in complete or review column?

    Sub CommandButton15_Click()
    Range("D6") = Environ("Username") & " " & Format(Date, "dd-mm-yyyy")
    End Sub

    Please let me know if it is possible.

    Please reply me if you have any codes for this.

    PFA Sheet for your reference.

    Highly appreciate.
    Attached Files Attached Files
    Last edited by confusebox; 10-26-2016 at 03:53 PM.

  2. #2
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Excel Userform checklist with date and userid

    added some code to get you on your way. Hope you find it helpful.
    Attached Files Attached Files
    Frob first, tweak later

  3. #3
    Registered User
    Join Date
    09-14-2016
    Location
    India
    MS-Off Ver
    2007
    Posts
    10

    Re: Excel Userform checklist with date and userid

    Wow man....

    Thank you so much...

    I highly appreciate your help..

    Have a great day

  4. #4
    Registered User
    Join Date
    09-14-2016
    Location
    India
    MS-Off Ver
    2007
    Posts
    10
    Quote Originally Posted by Neil_ View Post
    added some code to get you on your way. Hope you find it helpful.
    Hey Neil,
    I made some changes in sheet and userform.

    Is it possible if i add client code and press go button then only task for that client will show in listbox(Task list box)?

    Also can we filter task by team name?

    Thank you.
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Excel Userform checklist with date and userid

    Hi,
    there are two ways of adding values to a list box. One way is to recursively add each value. The other is to set the Row Source to a range, which you have done. Unfortunately, the Row Source must be contiguous for a list box. If there are filtered rows within the range, then the list box will not populate. The following code will work as it stands, but only if the clients are contiguous. You can't have a gap, then 'Google' again a bit further down.
    Also as the teams are incongruous, the Row Source would end up a multi-select range, so the list box would not populate.

    Please Login or Register  to view this content.
    You could change the list box to one that has values added, but there are consequences. The List Box can no longer have a header row. Also a representative array to match the list would need to be added to the code.
    Last edited by Neil_; 10-25-2016 at 02:42 PM.

  6. #6
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Excel Userform checklist with date and userid

    By the way, the initial code I posted was for a single select style list box. If you change it to multi-select, only the first item selected will be updated by 'complete' and 'Review'. The code would need to be re-written for a multi-select style list box.

  7. #7
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Excel Userform checklist with date and userid

    Added code to enable completion / review using multi-select. changed method of populating list box to value list. Added filter for Client. Added filter for team.
    Attached Files Attached Files

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

    Re: Excel Userform checklist with date and userid

    @ Neil_

    Actually there's a third and possibly best way to fill ListBox/Combobox being the List-method.
    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.

  9. #9
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Excel Userform checklist with date and userid

    @ Bakerman. Not familiar with it. Could you explain what you mean? I only know of using a range / named range in the Row Source or adding values recursively. You could also add an array directly to the list, but this isn't helpful in this instance as the listbox represents a range in a sheet.
    Last edited by Neil_; 10-25-2016 at 05:46 PM.

  10. #10
    Registered User
    Join Date
    09-14-2016
    Location
    India
    MS-Off Ver
    2007
    Posts
    10
    Quote Originally Posted by Neil_ View Post
    @ Bakerman. Not familiar with it. Could you explain what you mean? I only know of using a range / named range in the Row Source or adding values recursively. You could also add an array directly to the list, but this isn't helpful in this instance as the listbox represents a range in a sheet.
    Hi Neil, Thank you.

    If task is overdue then it ask late reason if i cancel also it get complete without reason.

    Can we browse clients by client code as these are unique every time.

    If i want to select 2 or more teams how can select.

    One more help.

    Please help me for other buttons code.

    2nd Review NA = NA should get typed in that cell

    Unverify = Complete verify 2nd review cancel all .(Clear all cell for that task.)

    NA= NA should print in all cells for that task.

    Save and close=Save changes and close form.

    Thanks a lot..

  11. #11
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: Excel Userform checklist with date and userid

    Hmmm. There's helping and helping.

    Changed search for client code rather than client name.
    Search adds client name to box.
    Teams select-able.

    2nd Review NA = NA should get typed in that cell

    Unverify = Complete verify 2nd review cancel all .(Clear all cell for that task.)

    NA= NA should print in all cells for that task.

    Save and close=Save changes and close form.
    code added.

    Make sure you click on the Add Reputation star in the post. Mark the thread as SOLVED if you are happy with the code. You will have to start a new thread if you need help with other things in the form.
    Attached Files Attached Files
    Last edited by Neil_; 10-26-2016 at 02:39 PM.

  12. #12
    Registered User
    Join Date
    09-14-2016
    Location
    India
    MS-Off Ver
    2007
    Posts
    10
    Quote Originally Posted by Neil_ View Post
    Hmmm. There's helping and helping.

    Changed search for client code rather than client name.
    Search adds client name to box.
    Teams select-able.


    code added.

    Make sure you click on the Add Reputation star in the post. Mark the thread as SOLVED if you are happy with the code. You will have to start a new thread if you need help with other things in the form.
    I really Appriciate your help.

    Have a great day

+ 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. Creation of UserID and password for first time login at VBA multipage userform
    By Mangai Venkata in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-05-2016, 06:40 AM
  2. [SOLVED] Parsing by userid AND date: can't quite get the Match-Index right...
    By portsample in forum Excel General
    Replies: 2
    Last Post: 08-26-2014, 11:02 PM
  3. [SOLVED] Userform & Checklist as per excel
    By calvinle in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-29-2014, 02:44 PM
  4. Tim and date stamps for a checklist
    By rkj1966 in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 02-25-2014, 06:39 AM
  5. [SOLVED] Help with getting multiple values returned based on a date and userid
    By WhizGidget in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-11-2013, 01:59 PM
  6. Userform Creation - Checklist Yes/No with Comments
    By Beefmaster7337 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-13-2012, 03:50 AM
  7. [SOLVED] How can I get network userid in a cell in excel?
    By Kalpana_Kar in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2006, 06:20 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