Foxtable(狐表)用户栏目专家坐堂 → 打印设置简化代码


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

主题:打印设置简化代码

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


加好友 发短信
等级:一尾狐 帖子:497 积分:4892 威望:0 精华:0 注册:2012/4/20 8:42:00
  发帖心情 Post By:2016/10/19 13:17:00 [显示全部帖子]

 Dim b1 As String = ProjectPath & "Attachments\在籍学生基本信息.xls"
Dim b2 As String = ProjectPath & "Attachments\基本信息.xls"
Dim f1 As String  = ProjectPath & "Reports\在籍学生基本信息.xls"
Dim f2 As String  = ProjectPath & "Reports\基本信息.xls"
Select Case _UserGroup
    Case "校长","教导处"
        Dim Book As New XLS.Book(b1)
        Book.Build()
        Book.Save(f1)
    Case "班主任"
        Dim Book As New XLS.Book(b2)
        Book.Build()
        Book.Save(f2)
End Select
Dim App As New MSExcel.Application
Dim Wb As MSExcel.WorkBook = App.WorkBooks.Open(fl)
Dim Ws As MSExcel.WorkSheet = Wb.WorkSheets(1)
App.Visible = True
Ws.PrintPreview
App.Quit

 回到顶部