[VB]MsgBox with variable

Solved
Reese -  
 Anonymatum -
Hello,
I am a beginner with VB and I am trying to do something quite simple: to have a MsgBox that displays the result of two variables and some text.
For example: MsgBox Variable1 & "text1" & Variable2 & "text2"
But I get a Compile error Expected: end of statement that appears around text1. I know it should be simple but can someone help me?

4 answers

  1. le père
     
    Hello

    You need to use & to concatenate ("put together") text pieces:
    MsgBox Variable1 & "text1" & Variable2 & "text2"
    43
    1. Anonymatum
       
      Very useful; Thank you very much.
      0