how do i add the numbers in label1 and label2 and i want it to appear at label3?
sk8rock_15 0 Newbie Poster
Recommended Answers
Jump to PostUse textbox control for input purpose, not label.
Have a command button control on your form first and put this code on it.
Private Sub Command1_Click() Sum = Val(Text1.Text) + Val(Text2.Text) Label3.Caption = Sum End Sub
Please read the forum rules first if this is your …
Jump to PostOnly with the title. The title needs to have a description of your error, say "Add numbers in labels". Being new, no harm no foul.:)
As far as your question goes, what bexactly do you need if you are not going to get the sum of both. If you …
Jump to PostNo it will not. If the OP starts with more advanced coding, he is going to fall into a pitfall, bugging his application. If we do give advice, we give the correct advice.:)
It still works without declaring sir
It will because "Sum" is a function within vb6. What if …
Jump to Post@Abe, sir andre is right, we need to declare variables even if vb6 accept and run without declaring any variable. Try to put this code on the General Declaration area so you will not forget to declare your variables :D
Option Explicit
You can also make vb6 …
All 15 Replies
abelingaw 69 Posting Whiz in Training
sk8rock_15 0 Newbie Poster
sk8rock_15 0 Newbie Poster
AndreRet 526 Senior Poster
sk8rock_15 0 Newbie Poster
sk8rock_15 0 Newbie Poster
abelingaw 69 Posting Whiz in Training
sk8rock_15 0 Newbie Poster
abelingaw 69 Posting Whiz in Training
sk8rock_15 0 Newbie Poster
abelingaw 69 Posting Whiz in Training
sk8rock_15 0 Newbie Poster
abelingaw 69 Posting Whiz in Training
AndreRet 526 Senior Poster
jhai_salvador 48 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.