关于dim storestring as string的
Dim storestring As StringPrivate Sub Command1_Click()Text1.Text = storestringCommand1.Enabled = FalseEnd SubPrivate Sub Command2_Click()storestring = Text1.TextText1.Text = "" '清除Command1.Enabled = True
解析:
Dim storestring As String '定义全局变量storestring为字符串类型Private Sub Command1_Click() '名称为Command1的按钮的单击事件Text1.Text = storestring'将storestring中的数据赋予text1;(即在text1文本框中显示storestring中的数据)Command1.Enabled = False '将名称Command1这个按钮设置为无效End SubPrivate Sub Command2_Click() '名称为Comamnd2的按钮的单击事件storestring = Text1.Text '将Text1文本框中的数据赋予storestringText1.Text = "" '清除Text1文本框中的内容Command1.Enabled = True '将名称为Command1的按钮设置为有效End Sub 相似的:
if text1.text = "hello" then msgbox "hello"else msgbox "bye"end if如果text1的内容是hello则提示hello否则不管什么内容都是bye
(此内容来自互联网~)