+ Reply to Thread
Results 1 to 8 of 8

Prompt early log out time using msgbox

  1. #1
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Prompt early log out time using msgbox

    hi,

    i have an excel file which tracks break time. The program works by logging in the start time of break and the log out time of the break of every employee. What I would like to do is to have a prompt if the user immediately logs out at an early time. Say if the user's start time break is 1:00 PM, if he happens to log out immediately, he should be given a prompt that he can only log out after 25 of his total 30 minute breaktime. Thus he can only log out at 1:26 PM.

    My code below currently logs in and logs out the time but without the prompt i would like to have.

    Please Login or Register  to view this content.

    thanks,

    stoey
    Last edited by stoey; 01-21-2009 at 05:43 AM. Reason: change title

  2. #2
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362
    Can anyone help?

  3. #3
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Can you post an example copy of your workbook - it will make it easier to workout what needs to be changed/added/removed from your code
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  4. #4
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362
    hi,

    here's a sample workbook requested. this workbook currently works by logging in and logging out the break time of a user. I would like to make a msgbox displayed if the user tries to log out immediately...Like if the user logs in at 1:00Pm then when he tries to log out immediately, a msg prompt would appear saying that " You can only log out starting at 1:25 PM which is 25 minutes after, of your total 30 minute break time." After 25 minutes then he can start logging out so as not to be overbreak on his 30 minute allowable break time.

    Thanks,

    Stoey
    Attached Files Attached Files
    Last edited by stoey; 01-17-2009 at 11:55 AM.

  5. #5
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Unhappy

    any help please?

  6. #6
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    I hope I have fully understood your problem
    On a backup copy of your workbook try replacing your Private Sub cmdendb1_Click macro with this one

    Also I notice that you have no error checking for when an ID is not found or when trying to Add Start time - I have added error checking to the code below to ensure that the variable CurRow has a value in it greated than 1


    Please Login or Register  to view this content.

  7. #7
    Forum Contributor
    Join Date
    08-07-2008
    Location
    United States
    MS-Off Ver
    Microsoft Office 2003
    Posts
    362

    Solved

    hi mudraker,

    This is exactly what I needed. Thanks a lot!


    Cheers,

    Stoey

  8. #8
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    glad to hear the code I provided solved your problem

+ 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