以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  求帮助  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=67859)

--  作者:psl138742
--  发布时间:2015/5/5 10:49:00
--  求帮助
请问我想打开选定文件需要在下面做何修改
Dim dlg As New OpenFileDialog \'定义一个新的OpenFileDialog 
dlg.Filter= "Excel文件|*.xls" \'设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then \'如果用户单击了确定按钮
       MessageBox.Show("你选择的是:" & dlg.FileName,"提示") \'提示用户选择的文件
End If

--  作者:大红袍
--  发布时间:2015/5/5 10:50:00
--  
Dim dlg As New OpenFileDialog \'定义一个新的OpenFileDialog
dlg.Filter= "Excel文件|*.xls" \'设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then \'如果用户单击了确定按钮
    Dim proc As new Process
    proc.File = dlg.FileName
    proc.Start
End If

--  作者:Bin
--  发布时间:2015/5/5 10:50:00
--  
http://www.foxtable.com/help/topics/0353.htm

Dim dlg As New OpenFileDialog \'定义一个新的OpenFileDialog 
dlg.Filter= "Excel文件|*.xls" \'设置筛选器
If dlg.ShowDialog = DialogResult.Ok Then \'如果用户单击了确定按钮
       Dim Proc As New Process \'定义一个新的Process
Proc.File = dlg.FileName
Proc.Start()
End If