Home > Archive > Visual Basic > December 2005 > How to do this
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| luigidon 2005-12-16, 6:56 pm |
| Hello!
I am beginner in programing VB and I have a question.
I would like to make a program, which will do the sum of the hours that
I am on work. So that I would type for example 4 hours and the sum will
be 4. Next time I would type 5 and the sum would be 9, nex time i would
type 10 and sum would be 19, and so on. Can someone please give me some
directions of how to do this?For start only in one session of program,
se everery restart of program will star from 0.
thanks...
bye
matjaz
| |
| Ken Halter 2005-12-16, 6:56 pm |
| "luigidon" <matjaz.gercar@ognjisce.si> wrote in message
news:1134746866.349441.94400@g47g2000cwa.googlegroups.com...
> Hello!
> I am beginner in programing VB and I have a question.
>
> I would like to make a program, which will do the sum of the hours that
> I am on work. So that I would type for example 4 hours and the sum will
> be 4. Next time I would type 5 and the sum would be 9, nex time i would
> type 10 and sum would be 19, and so on. Can someone please give me some
> directions of how to do this?For start only in one session of program,
> se everery restart of program will star from 0.
>
> thanks...
> bye
> matjaz
This may help get you started.
Project_Time_Tracker
http://www.planetsourcecode.com/vb/...=57052&lngWId=1
--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Freeware 4 color Gradient Frame? http://www.vbsight.com/GradFrameCTL.htm
| |
|
| Total = Total + x, this sounds nothing, is this you really want? or you
wanna do something with hour(day)..??
| |
| luigidon 2005-12-16, 6:56 pm |
| Hm, it is nothing, so thats what botters me, that I cannot do.
I have text box named "txtVpis" and label box named "lblSestevek" and
command button named "cmdOK"
I was trying to do this like this:
------------------
Private Sub cmdOK_Click()
Dim ure As Integer
ure = txtVpis.Text
ure = txtVpis.Text + ure
lblSestevek.Caption = ure
End Sub
------------------------
And sure the result is the number that I input*2. So if I enter 5 the
result is 10, when I enter 3 the result is 6 and so on. I know why the
result is doubled, but I cannot make this program do the sum. That
everytime I enter a number, this number would be summed to the
others...
So simple and so hard....
| |
| Ken Halter 2005-12-16, 6:56 pm |
| "luigidon" <matjaz.gercar@ognjisce.si> wrote in message
news:1134749402.029022.280460@g49g2000cwa.googlegroups.com...
> Hm, it is nothing, so thats what botters me, that I cannot do.
>
> I have text box named "txtVpis" and label box named "lblSestevek" and
> command button named "cmdOK"
Try.....
'====
Private Sub cmdOk_Click()
lblSestevek.Caption = Val(txtVpis.Text) + Val(lblSestevek.Caption)
End Sub
'====
--
Ken Halter - MS-MVP-VB - Please keep all discussions in the groups..
DLL Hell problems? Try ComGuard - http://www.vbsight.com/ComGuard.htm
Freeware 4 color Gradient Frame? http://www.vbsight.com/GradFrameCTL.htm
| |
| luigidon 2005-12-16, 6:56 pm |
| I cant believe this, it works:):):)Thanks....
Can you please explain me what this VAL do?
Now I will try to go to the next step:) To get this sum in to a
variable and then into some file.
Actually I wanna do a program that records mine workign hours. Which
day, and how many hours and the sum of the hours for each month.
Is there any ideas how to do this?
| |
| Lee Peedin 2005-12-16, 6:56 pm |
| Someone much more versed in VB will be along soon (I'm sure) to assist
you, but since while you're add it, why not include a prompt for
"Project" at the same time. Sooner or later someone (including)
yourself is probably going to want to know what you were working on
during that time.
Lee
On 16 Dec 2005 08:46:33 -0800, "luigidon" <matjaz.gercar@ognjisce.si>
wrote:
>I cant believe this, it works:):):)Thanks....
>
>Can you please explain me what this VAL do?
>
>Now I will try to go to the next step:) To get this sum in to a
>variable and then into some file.
>
>Actually I wanna do a program that records mine workign hours. Which
>day, and how many hours and the sum of the hours for each month.
>
>Is there any ideas how to do this?
| |
| Jeff Johnson [MVP: VB] 2005-12-16, 6:56 pm |
|
"luigidon" <matjaz.gercar@ognjisce.si> wrote in message
news:1134751593.441363.210130@f14g2000cwb.googlegroups.com...
> Can you please explain me what this VAL do?
If you don't have MSDN installed on your computer then use this:
http://msdn.microsoft.com/library. Either way, look it up.
| |
| luigidon 2005-12-17, 6:55 pm |
| Ok, thanks...Yes I dont have MSDN installed, because I have some
student version:) We got these version on our college.
|
|
|
|
|