I am trying to concatenate in vb6. The operator += is not supported, and I want to do something like the code below. I want to add more strings to a textbox as the program works down this code. Can anyone advise what to change += to? I know & can be used when adding one string to another, but it the example I am working on here, that doesn't seem suitable.
Thanks.
If (strHomeNo <> "") Then
txtPhoneNums = "Home: " + strHomeNo
End If
If (strMobileNo <> "") Then
txtPhoneNums += "Mobile: " + strMobileNo
End If
If (strWorkNo <> "") Then
txtPhoneNums += "Work: " + strWorkNo
End If
If (txtPhoneNums <> "") Then
txtPhoneNums.ForeColor = vbBlack
txtPhoneNums.FontBold = False
End If
Else
txtPhoneNums.Text = "NO CONTACT DETAILS"
txtPhoneNums.ForeColor = vbRed
txtPhoneNums.FontBold = True
would :
txtPhoneNums = txtPhoneNums & "Work: " & strWorkNo
not work?