1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
on error resume
Next
Set
objDialog=CreateObject(
"UserAccounts.CommonDialog"
)
objDialog.Filter=
"仅支持xls格式文件|*.xls"
objDialog.InitialDir="C:\"
intResult=objDialog.ShowOpen
If
intResult=0
Then
Wscript.Quit
Else
If
Right(objDialog.FileName,3)=
"xls"
Then
Wscript.Echo objDialog.FileName
Else
Wscript.Echo
"你选择的文件格式不支持"
Wscript.Quit
End
If
End
If
|