⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 lmb.bas

📁 lmb--路面工程数量计算软件
💻 BAS
字号:
Attribute VB_Name = "Module2"
Option Explicit
Sub Qquit_Excel()
    xlbook.Save
    Set xlsheet1 = Nothing
    Set xlsheet2 = Nothing
    Set xlsheet3 = Nothing
    Set xlsheet4 = Nothing
    Set xlsheet5 = Nothing
    xlbook.Parent.Quit
    Set xlbook = Nothing
End Sub
Sub ckbg()
        xlbook.Application.Visible = True
        xlbook.Windows(1).Visible = True
End Sub
Sub iniExcel()
    On Error GoTo ErrorTrap
    Set xlbook = GetObject(App.Path & "\lmbb.xls")
    Set xlsheet1 = xlbook.Worksheets("原始数据")
    Set xlsheet2 = xlbook.Worksheets("路面1")
    Set xlsheet3 = xlbook.Worksheets("路面2")
    Set xlsheet4 = xlbook.Worksheets("Sheet4")
    Exit Sub
ErrorTrap:
    Select Case Err.Number
        Case 432        '文件未找到
            Dim Response
            Response = MsgBox _
                ("无法在默认路径找到“lmb.xls”,您是否进行手工查找?" _
                , vbYesNo + vbCritical, "运行错误")
            If Response = vbYes Then
                Form1.cmDialog.Filter = "工作薄文件(*.xls)|*.xls|所有文件(*.*)|*.*"
                Form1.cmDialog.InitDir = App.Path
                Form1.cmDialog.ShowOpen
                If Form1.cmDialog.filename <> "" Then
                    Set xlbook = GetObject(Form1.cmDialog.filename)
                    Set xlsheet1 = xlbook.Worksheets("原始数据")
                    Set xlsheet2 = xlbook.Worksheets("路面1")
                    Set xlsheet3 = xlbook.Worksheets("路面2")
                    Set xlsheet4 = xlbook.Worksheets("Sheet4")
                Else
                    End
                End If
            Else
                End
            End If
        Case Else
            End
    End Select
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -