VB怎么在字符串里加入变量?如何将变量和常量同时加入一个文本框?
提问:VB怎么在字符串里加入变量?如何将变量和常量同时加入一个文本框?
Private Sub Command1_Click()Dim N1 As DoubleN1 = Text1.TextText3.Text = N1;"+"End Sub以上为代码,VB显示“语法错误”如果变量是2,我想要的效果是:在Text3中显示 : 2+求解。
网友回答:
基础语法.VB的字串连接用&的,程序为
Private Sub Command1_Click()
Dim N1 As Double
N1 = Text1.Text
Text3.Text = N1 & "+"
End Sub
结果不测试