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 Post@Sir Andre
@Abe, your code will not work. You need to declare the sum first -
It still works without declaring sir ;)
@sk8rock_15
Have a look at this, I included the code for the Picture controls.Private Sub Command1_Click() Sum = Val(Label1.Caption) + Val(Label2.Caption) Label3.Caption …
Jump to PostPlease mark thread as solve if your problem was solved.
Cheers!!
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.