Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
user form with conditions
Hellow Vba experts,
Through a Userform data(4 fields) is to be entered into my W/sheet.The W/sheet has 4 columns - Col A - "Employee Id",Col B-"Date",Col C-"Time In" and Col D-"Time Out" In my Userform I have 4 Textboxes,2 Labels,3 Command buttons.The lay out order is: Label1--Enter your Id Textbox1--for Employee id entry CommandButton1--"Confirm" Textbox2,3,4 -- for Employee id,Time in,Time out display. Commandbutton 2--"In" or "Out" Condbuttonbutton3--"Close". I need a proper code for Userform--Whenever an employee enters his id in Textbox1 and press "Confirm" button,the code should verify from W/sheet ,what action needed,whether he will "in" or "out",whether any "in time" record for current date is there or not for the id entered and accordingly "In" or "Out" button be activated i.e the button name/label be changed accordingly. After pressing "in" or "out" button the data should update in w/sheet's employee id,date,in time or out time. Suppose employee came to work( "in time") at 10:00 PM yesterday and ends his job today at 6:00AM(Time Out),when enters his id today,the "Out" button should populate. Output needed:-When "In" button pressed,W/sheet's last row be updated as: Col A------------Col B------------Col C------------Col D EmployeeId--- Date-----------Time In ---------- Time Out 105914 --- 04/01/2009 --- 06:00 AM ----- and on userform Textbox2 and 3 be displayed Emploee Id and Time In. When "Out" button pressed Col A------------Col B------------Col C------------Col D EmployeeId--- Date-----------Time In ---------- Time Out 105914 --- 04/01/2009 --- 06:00 AM ----- 02:10 PM and on userform Textbox2 and 3 be displayed Emploee Id and Time In and Time Out. Note: In one day one Time In and one Time Out entry validation necessary. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200904/1 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
user form with conditions
See one of your other posts.
"tkraju via OfficeKB.com" wrote: Hellow Vba experts, Through a Userform data(4 fields) is to be entered into my W/sheet.The W/sheet has 4 columns - Col A - "Employee Id",Col B-"Date",Col C-"Time In" and Col D-"Time Out" In my Userform I have 4 Textboxes,2 Labels,3 Command buttons.The lay out order is: Label1--Enter your Id Textbox1--for Employee id entry CommandButton1--"Confirm" Textbox2,3,4 -- for Employee id,Time in,Time out display. Commandbutton 2--"In" or "Out" Condbuttonbutton3--"Close". I need a proper code for Userform--Whenever an employee enters his id in Textbox1 and press "Confirm" button,the code should verify from W/sheet ,what action needed,whether he will "in" or "out",whether any "in time" record for current date is there or not for the id entered and accordingly "In" or "Out" button be activated i.e the button name/label be changed accordingly. After pressing "in" or "out" button the data should update in w/sheet's employee id,date,in time or out time. Suppose employee came to work( "in time") at 10:00 PM yesterday and ends his job today at 6:00AM(Time Out),when enters his id today,the "Out" button should populate. Output needed:-When "In" button pressed,W/sheet's last row be updated as: Col A------------Col B------------Col C------------Col D EmployeeId--- Date-----------Time In ---------- Time Out 105914 --- 04/01/2009 --- 06:00 AM ----- and on userform Textbox2 and 3 be displayed Emploee Id and Time In. When "Out" button pressed Col A------------Col B------------Col C------------Col D EmployeeId--- Date-----------Time In ---------- Time Out 105914 --- 04/01/2009 --- 06:00 AM ----- 02:10 PM and on userform Textbox2 and 3 be displayed Emploee Id and Time In and Time Out. Note: In one day one Time In and one Time Out entry validation necessary. -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.a...mming/200904/1 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Date field in user form & Loading a user form on opening workbook | Excel Programming | |||
Call user form from ThisWorkbook; close file if form closed | Excel Programming | |||
Automatically add a textbox to a user form based on user requireme | Excel Programming | |||
User form ComboBox Items: Remember user entries? | Excel Programming | |||
How to: User Form to assign a user defined range to a macro variab | Excel Programming |