how to add numbers in vb 6.0 c


can you help me??? can you give the syntax in computing number in vb6.0

If you enjoyed this post, subscribe for updates (it's free)

waley

waley

tnx!

tnx! :D

Well when you add numbers in

Well when you add numbers in VB you are best using the + symbol.

e.g. MsgBox Val(Text1.Text) + Val(Text2.Text)
Text1.Text = 6, Text2.Text = 7 MsgBox will show 13

If you are adding text then you would use the & symbol.

e.g. MsgBox Text1.Text & " " & Text2.Text
Text1.Text = "Hello", Text2.Text = "World"
MsgBox will show Hello World

I've been programming with VB for 14 years. Started with VB4 16bit Pro, VB5 Pro, VB6 Pro/Enterprise and now VB3 Pro. But I'm no expert, I'm still learning.