|
'窗体代码
Private Sub UserForm_Initialize() 'chsw68老师,默认设置
With Me
.OptionButton2.Value = True
.个数.Text = 5
End With
End Sub
Private Sub CommandButton1_Click() '确定按纽
r = Me.个数.Text
If OptionButton1.Value = True Then
p = 1 '显示按纽(①打开【34】路径)
ElseIf OptionButton2.Value = True Then
p = 2
Else
p = 3
End If
Sheet1.[a2] = r
Sheet1.[b2] = p
Call 模块1.导入(r, p)
End Sub
'模块代码
Sub 导入(r, p)
' Dim r As String, p As String
'Application.ScreenUpdating = False
' r = Application.InputBox("选择【数据运行环境】" & Chr(10) & "■1:AD;" & Chr(10) & "■2:川富;" & Chr(10) & "■3:XXEE;", "选择【数据运行环境】", 2)
' p = Application.InputBox("■请输入数值", "", 4)
MsgBox "r=" & r
MsgBox "p=" & p
'Application.EnableEvents = True
End Sub
公用变量2.rar
(38.78 KB, 下载次数: 5)
|
评分
-
查看全部评分
|