+ Reply to Thread
Results 1 to 2 of 2

VBA to Search and Replace??

  1. #1
    Registered User
    Join Date
    06-24-2011
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    2

    VBA to Search and Replace??

    Ive created a in/out time time clock using "Userform"
    it works very well, but it's populating my spread sheet row by row. One employee may punch in at 8am and another at 2pm.
    I need a code so when the 8am employee punches "OUT", the Out punch data populates in the original row (instead of creating a NEW row)

    here is the code i have so far

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by riosaaron; 06-24-2011 at 01:22 PM. Reason: Changed PHP Tags to Code Tags

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: VBA to Search and Replace??

    Hello riosaaron,

    Welcome to the Forum!

    I added a macro to the UserForm that will return the row the person's name is in. If they have not clocked in yet, it returns a zero. If the return value is zero then iRow defaults to the next available row.

    Along with this macro, each button now checks if the person has already clocked in or out and displays a message if true. Also a new entry under the same is locked out for 24 hours. here is the macro and the updated UserForm code. All these changes have been made to the attached workbook.

    Macro to Return Row Number of Person's Name
    Please Login or Register  to view this content.

    Updated UserForm Code
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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