高手帮帮忙_万分感谢!
<p>请教高手, 我刚学习VBA,调试一个程序怎么也运行不了, 我用的是CAD2007, 下面是一个单位互换的程序,高手给看下, 问题出在那, :其中:我也试过:在把TextBox1改成TextBox1.txt,类似的都改了, 还是不行, </p><p>Private Sub OptionButton1_Click()<br/>If TextBox1 = " " Then<br/>TextBox2 = TextBox1 * 1.0936<br/>Else<br/>TextBox1 = TextBox2 * 0.0936<br/>End If<br/>End Sub</p><p>Private Sub OptionButton2_Click()<br/>End<br/>End Sub</p><p>Private Sub TextBox1_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)<br/>TextBox2 = " "<br/>End Sub</p><p>Private Sub TextBox2_KeyDown(ByVal KeyCode As MSForms.ReturnInteger, ByVal Shift As Integer)<br/>TextBox1 = " "<br/>End Sub</p> 用TextBox1.Value试试 <p>textbox1和textbox1.text都是字符串,用字符串乘一个浮点数当然会出错了<img alt="" src="http://www.mjtd.com/Bbs/Skins/default/topicface/face2.gif"/></p><p>应该是val(textbox1)*1.0936</p>
页:
[1]