Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date field in user form & Loading a user form on opening workbook Balan Excel Programming 1 May 24th 08 03:40 PM
Call user form from ThisWorkbook; close file if form closed XP Excel Programming 2 July 20th 07 07:04 PM
Automatically add a textbox to a user form based on user requireme Brite Excel Programming 4 April 7th 07 11:37 PM
User form ComboBox Items: Remember user entries? [email protected] Excel Programming 0 March 29th 07 06:41 PM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM


All times are GMT +1. The time now is 07:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"