Private Sub CommandButton1_Click() If OptionButton1.Value = ture Then ThisDrawing.SetVariable "USERI1", 1 Else ThisDrawing.SetVariable "USERI1", 0 End If UserForm1.Hide End Sub
Private Sub CommandButton2_Click() Exit Sub End Sub
True写错:)
Private Sub CommandButton1_Click() If OptionButton1.Value Then ThisDrawing.SetVariable "USERI1", 1 If OptionButton2.Value Then ThisDrawing.SetVariable "USERI1", 0 Unload Me End Sub
Private Sub CommandButton2_Click() Unload Me End Sub
下面的例子向一个文本文件写
Sub tt() Open "c:\2.txt" For Binary As 1# Put 1#, , "ABC" & vbCrLf & "123" Close 1# End Sub
对应的,你可以用TextBox1.Text代替上面的"ABC",TextBox2.Text代替"123".......