ok, so in Java you do "blahblah " + variable + " blahblah"
which outputs into "blahblah 23 blahblah"

but how do I do this in VB? I wanted to have a label with

HPvariable + "/" + MAXHPvariable

so it'll display 18/23 etc...

create a form
place one label & command button
code for command button

'----------------------------------
Private Sub Command1_Click()
Dim v1, v2 As Long
v1 = 100
v2 = 200
Label1.Caption = Trim(CStr(v1)) & "/" & Trim(CStr(v2))
End Sub


reply

ahh yes why didnt I think of that

BTW santosh5471 and pasido, in santosh's example only the V2 variable is declared as long while the V1 variable is a varient... Just so you know...

Good Luck

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.