简体   繁体   中英

Geting textbox value in msgbox excel VBA

I want a message box to appear after someone has entered a wrong value For example:

Msgbox("The value ""txtID"" is wrong")

So if i typed the wrong value the message box should say "The value 200(for example) is wrong" . How can i do that?

Anything within double quotes will be considered as a string. Try this.

Msgbox("The value " & txtID & " is wrong")

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