Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/excel/28.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
在msgbox excel VBA中获取文本框值_Excel_Textbox_Msgbox_Vba - Fatal编程技术网

在msgbox excel VBA中获取文本框值

在msgbox excel VBA中获取文本框值,excel,textbox,msgbox,vba,Excel,Textbox,Msgbox,Vba,我希望有人输入错误值后出现一个消息框,例如: Msgbox("The value ""txtID"" is wrong") 因此,如果我输入了错误的值,消息框应显示“值200(例如)错误”。我该怎么做呢?双引号内的任何内容都将被视为字符串。试试这个 Msgbox("The value " & txtID & " is wrong")

我希望有人输入错误值后出现一个消息框,例如:

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

因此,如果我输入了错误的值,消息框应显示“值200(例如)错误”。我该怎么做呢?

双引号内的任何内容都将被视为字符串。试试这个

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