Foxtable(狐表)用户栏目专家坐堂 → 如何标记文件名?


  共有2766人关注过本帖树形打印复制链接

主题:如何标记文件名?

帅哥哟,离线,有人找我吗?
大红袍
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:贵宾 帖子:39310 积分:196782 威望:0 精华:1 注册:2015/4/25 9:23:00
  发帖心情 Post By:2015/6/11 9:11:00 [显示全部帖子]

Dim App As New MSExcel.Application
Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open("D:\test.xls")
Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)
app.Visible = True

Dim ps As  System.Diagnostics.Process() = System.Diagnostics.Process.GetProcessesByName("excel")
For Each p As System.Diagnostics.Process In ps
    If p.MainWindowTitle Like "*test*" Then
        msgbox("test文件已经打开")
        Return Nothing
    End If
Next

Dim App1 As New MSExcel.Application
Dim Wb1 As MSExcel.WorkBook = App1.WorkBooks.Open("D:\test.xls")
Dim Ws1 As MSExcel.WorkSheet = Wb1.WorkSheets(1)
app1.Visible = True


 回到顶部