为什么把textbox里的数据输出到Excel中总是报错“加载dll错误”
为什么把textbox里的数据导出到Excel中总是报错“加载dll错误”程序代码:
Private Sub CmdExport_Click() Dim xlapp As Excel.Application Dim xlbook As Excel.Workbook Dim xlsheet As Excel.Worksheet Set xlapp = CreateObject("excel.application") Set xlbook = xlapp.Workbooks.Add xlapp.Visible = True Set xlsheet = xlbook.Worksheets("风机参数") xlsheet.Cells(1, 1) = "机号No." xlsheet.Cells(1, 2) = "转动方式." xlsheet.Range("A2").Value = Text5.Text xlsheet.Range("B2").Value = Text6.Text xlsheet.Range("C2").Value = Text7.Text xlsheet.Range("D2").Value = Text3.Text Set xlsheet = Nothing Set xlbook = Nothing xlapp.Quit Set xlapp = Nothing End Sub