English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

How to concatenate a text box with a message label?

2007-10-17 15:36:25 · 1 answers · asked by andre b 1 in Computers & Internet Programming & Design

1 answers

Dim strA, strB , strAB as string

strA = textbox1.text
strB = label1.text

strAB = strA & strB

EDIT:
Concatenation uses the ampersand (&) operator to concatenate text. Concatenation is basically sticking one string onto another.

The above example uses variables to record the individual strings in the textbox and lable. A third string is used to hold the result of the concatenation.

You can easily use the text properties of each control (textbox, label) directly without the variables and obtain the same results

strAB = textbox1.text & label1.text

OR load the result directly into another control

textbox2.text = textbox1.text & label1.text

2007-10-17 15:49:16 · answer #1 · answered by MarkG 7 · 0 0

fedest.com, questions and answers