[VB]MsgBox with variable
Solved
Reese
-
Anonymatum -
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?
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?
Related links:
- replacing point with comma using VBA
- Code VBA pour une fenêtre pop-up : ```vba Sub ShowMessage() MsgBox "Ceci est un message d'alerte", vbInformation, "Titre de la fenêtre" End Sub ```
- Runtime Error 91 in Excel/VBA
- VBA Excel: selecting a variable range
- VBA get value returned by MsgBox
- display the content of a variable in a msgbox