+ Reply to Thread
Results 1 to 5 of 5

Using VBA in a holiday planner

  1. #1
    Registered User
    Join Date
    06-23-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    57

    Question Using VBA in a holiday planner

    Hi all,

    I'm trying to make a creative and easy to use holiday planner that'll be used with the heads of departments in my office.

    I so far have the general layout of how I want the worksheet to look (see images attached). The calendar covers the entire year (horizontally).

    What I'd like to do is have a user open the userform from a button on the worksheet (not yet added), select an employee, the type of absence (holiday, sick leave or other) and add the "from" and "to" dates.

    When they hit submit, it'll match the employee name from the nameCombox1 to the worksheet (sheet1.range("B2:B20")), note the absence type selected (which should format the target cell(s) with "Holiday", "Sick Leave" or "Other") then find the "from date" and the "to" date and add the absence type value to the cells horizontally between these two dates.

    I have been plugging away at this over the last day but haven't had any luck.

    If anyone can help me with either of these two problems, I'd be very grateful!

    Thanks in advance.

    Adam

    I originally asked this on Mr Excel. Due to the urgency of this doc I'm trying to increase my chances of a reply. I'll keep both threads updated.

    http://www.mrexcel.com/forum/showthr...=1#post2665751
    Attached Images Attached Images
    Last edited by AGrace; 03-31-2011 at 03:54 AM. Reason: add link

  2. #2
    Forum Contributor mccrimmon's Avatar
    Join Date
    02-19-2004
    Location
    Scotland
    MS-Off Ver
    2003
    Posts
    249

    Re: Using VBA in a holiday planner

    Hi

    Please can you provide a copy of the workbook in question?

    Thanks

    McC
    McCrimmon

  3. #3
    Registered User
    Join Date
    06-23-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Using VBA in a holiday planner

    Quote Originally Posted by mccrimmon View Post
    Hi

    Please can you provide a copy of the workbook in question?

    Thanks

    McC
    Oh my.. I'm so stupid.. sorry, forgot you could do that on this forum.. doh. Will attach to this post.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-23-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Using VBA in a holiday planner

    Hi all,

    have included this to populate the planner.

    Please Login or Register  to view this content.
    The only thing that's not working now is that the date in the drop down comboboxes is in an american format (mm/dd/yy) that the source isn't (dd/mm/yy). Any thought's?

    Thanks,

    Adam

  5. #5
    Registered User
    Join Date
    06-23-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    57

    Re: Using VBA in a holiday planner

    Fixed the date issue with this:

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

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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