代码:
Dim xlsobj1 As Excel.Application Set xlsobj1 = CreateObject("Excel.Application") xlsobj1 = GetObject(TxtPath1.Text)
^^^^^^^^^出错位置!! xlsobj1.Quit Set xlsobj1 = Nothing
Dim xlsobj1 As Excel.Application Set xlsobj1 = CreateObject("Excel.Application") xlsobj1 = GetObject(TxtPath1.Text)
^^^^^^^^^出错位置!! xlsobj1.Quit Set xlsobj1 = Nothing
Dim xlsobj1 As Excel.Application
改成
Dim xlsobj1 As Object
就可以了
^_^