Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共3 条记录, 每页显示 10 条, 页签: [1]
[浏览完整版]

标题:[求助]打开指定文件夹(搞定)

1楼
易服 发表于:2011/8/18 12:08:00

按钮代码:

打开指定文件夹 D:\My Documents\退耕报表

 

[此贴子已经被作者于2011-8-19 10:24:04编辑过]
2楼
狐狸爸爸 发表于:2011/8/18 12:15:00

http://www.foxtable.com/help/topics/0359.htm

http://www.foxtable.com/help/topics/0328.htm

 

3楼
易服 发表于:2011/8/19 8:54:00

反复摸索终于搞定

Dim dlg As New OpenFileDialog '定义一个新的OpenFileDialog
dlg.InitialDirectory="D:\My Documents\退耕报表" '最初显示的目录
dlg.Filter= "Excel文件|*.xls|Word文件|*.doc|Access文件|*.mdb" '设置筛选器
dlg.MultiSelect = True '选择多个文件
If dlg.ShowDialog = DialogResult.OK Then '如果用户单击了确定按钮
For Each fl As String In dlg.FileNames
    Dim App As New MSExcel.Application
    Dim Wb As MSExcel.Workbook = App.WorkBooks.Open(""& fl & "")
    Dim Wd As MSExcel.Window = Wb.Windows(1)    '表示当前工作簿窗口
    Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)
    App.Visible = True
Next
End If

共3 条记录, 每页显示 10 条, 页签: [1]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .03125 s, 2 queries.