Programmers; How hard would it be to create this program?

Crazymofo

Platinum Member
May 14, 2003
2,339
0
0
I need a prog that is just a box with buttons probably just two for now. One is for "Out" and one for "In" what I want it to do is; if you click out it records the time and date to an "out" column in a spread sheet and holds its place until you click in and then records the time and date to the next column marked "in"... And maybe if I want to get fancy have it calculate the time diff between the two times in a third column.

Any thoughts, comments and help will be greatly appreciated...
 

TSDible

Golden Member
Nov 4, 1999
1,697
0
76
Will you be using Excel for your spreadsheet?

If so, it would be fairly easy to design a UserForm that does this using VBA.
 

Crazymofo

Platinum Member
May 14, 2003
2,339
0
0
Originally posted by: TSDible
Will you be using Excel for your spreadsheet?

If so, it would be fairly easy to design a UserForm that does this using VBA.

I have no problem using Excel for the spreadsheet... How might I go about learning this UserForm process? Really a programming moron so I need all the help I can get...

Thanks for the reply!
 

TSDible

Golden Member
Nov 4, 1999
1,697
0
76
You can use the macro recorder to learn some code, but that would take a while.

It is getting late here, or I would do it for you. If you can wait a day or two I can put something together.

Open excel, and hit Alt+F11 to get to the visual basic editor.

Will there be multiple things being checked out/in? Or is it more of a timer?

Feel free to email me a blank copy of the sheet that you are going to be using, and I can make it happen.
 

TSDible

Golden Member
Nov 4, 1999
1,697
0
76
In its simplest form, you have the following.....

In the "ThisWorkbook" VBA code you have

Private Sub Workbook_Open()
UserForm1.Show
End Sub


Where UserForm1 is the name of the form you designed.

Then, you have two Subs in a userform that you designed

Private Sub btnIN_Click()
Dim ws As Worksheet
Set ws = Sheets("Sheet1")
ws.Range("a65535").End(xlUp).Offset(0, 1).Value = Now()
End Sub

Private Sub btnOUT_Click()
Dim ws As Worksheet
Set ws = Sheets("Sheet1")
ws.Range("a65535").End(xlUp).Offset(1, 0).Value = Now()
End Sub

where btnIN is the name of the "IN" button, and btnOUT is the name of the "OUT" button.

 

Zugzwang152

Lifer
Oct 30, 2001
12,134
1
0
this would be even easier as a web based app using php/mysql or the like... all functions needed are pretty much imbedded in the languages already.
 

Crazymofo

Platinum Member
May 14, 2003
2,339
0
0
Originally posted by: TSDible
In its simplest form, you have the following.....

In the "ThisWorkbook" VBA code you have

Private Sub Workbook_Open()
UserForm1.Show
End Sub


Where UserForm1 is the name of the form you designed.

Then, you have two Subs in a userform that you designed

Private Sub btnIN_Click()
Dim ws As Worksheet
Set ws = Sheets("Sheet1")
ws.Range("a65535").End(xlUp).Offset(0, 1).Value = Now()
End Sub

Private Sub btnOUT_Click()
Dim ws As Worksheet
Set ws = Sheets("Sheet1")
ws.Range("a65535").End(xlUp).Offset(1, 0).Value = Now()
End Sub

where btnIN is the name of the "IN" button, and btnOUT is the name of the "OUT" button.

Ok I've started playing with the VB thing in Excel and am now very confused... I'm going to email you the sheet I have and would love to see what you can come up with... I am willing to compensate for your work; I never expect anything for free...

 

TSDible

Golden Member
Nov 4, 1999
1,697
0
76
Originally posted by: Zugzwang152
this would be even easier as a web based app using php/mysql or the like... all functions needed are pretty much imbedded in the languages already.

Although PHP/mySQL would also be easy, I wouldn't say it is easier.

All the functions you need are built into excel as well.