|
代码运行的时候出现了
代码如下:
Sub 拱坝平面布置图()
Dim Path As String
Dim Hight, Z_cord, Tc, TaL, TaR As Double '定义拱圈厚度
Dim RcL, RcR, TgL, TgR As Double '定义拱圈半径,角度
Dim LastRow As Long
'----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Dim xlapp As Excel.Application
Dim xlbook As Excel.workbook
Dim xlsheet As Excel.worksheet
On Error GoTo ErrMsg
Set xlapp = CreateObject("excel.application")
Path = xlapp.GetOpenFilename("Microsoft Office Excel 文件(*.xls),*.xls", , "选择文件")
If Path = "False" Then
MsgBox ("Nothing")
End
End If
Set xlbook = xlapp.workbooks.Open(Path) '打开的EXCEL路径
Set xlsheet = xlbook.worksheets("参数") '打开EXCEL中的工作表
ErrMsg:
xlbook.Close
xlapp.Quit
Set xlapp = Nothing
End Sub
gfmy355c5pu.png
|
|