VBS 文件选择框,选择Excel文件

 

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

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-04-01
  • 2022-02-05
  • 2022-12-23
  • 2021-11-30
  • 2022-02-01
  • 2022-12-23
猜你喜欢
  • 2022-01-17
  • 2021-11-26
  • 2022-01-05
  • 2022-12-23
  • 2022-12-23
  • 2022-02-11
  • 2022-12-23
相关资源
相似解决方案