none
Sorting of tasks according to their priority in a VBA userform in excel RRS feed

  • Question

  • I want to make a VBA userform in excel where several tasks (say 50) will be listed and corresponding to each of the tasks, three options will be given- HIGH PRIORITY, MEDIUM PRIORITY & LOW PRIORITY. The user will be asked to sort the tasks according to their priority. Everything is okay upto this, but I want an additional control, i.e. to restrict the number of entries for each of HIGH PRIORITY & MEDIUM PRIORITY to 4. After the user has selected 4 tasks having HIGH PRIORITY or MEDIUM PRIORITY all the HIGH/MEDIUM PRIORITY options for the remaining tasks will be grayed out. How can I do this? Please help! Thanks in advance. 
    Thursday, February 20, 2014 5:21 PM

All replies

  • You can do it with userforms but it would be clunky and would need a number of careful tweaks. If you don't know how to start, you probably need an experienced VBA person to do it for you this time.

    I would do it in a worksheet, that way you can sort easily, color the background of high priority top 4 and medium top 4, still display error messages (you can only have 4 top priority etc.) Don't let them save until all rules met.

    Hide the worksheet once finished.


    Rod Gill
    Author of the one and only Project VBA Book
    www.project-systems.co.nz

    Thursday, February 20, 2014 7:12 PM