简体   繁体   中英

How to incorporate a changing variable into a text Msgbox in VBA?

I am currently trying to make a simple VBA program that would multiply two numbers together and then prompt a message box that says "The value of (variable1) and (variable 2) is (The answer) .

Here is my current attempt that isn't perfect:

 MsgBox prompt:=intmlt, Title:="The Value of " & intFirstNum & intSecondNum

The two big issues I have is how to you put a space inbetween the intFirstNum and intSecondNum ? and How do you add an is to the end of that prompt?

It should be

"The Value of " & intFirstNum & " and " & intSecondNum & " is "

Per @ScottHoltzman

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM