在按钮的CLICK事件中加入 Dim Irow, Icol As Integer Dim Irowcount,
Icolcount As Integer Dim Fieldlen() "存字段长度值 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 Set
xlSheet = xlBook.Worksheets(1)
With
Data1.Recordset .MoveLast
If .RecordCount $#@60; 1
Then MsgBox ("Error 没有记录!") Exit Sub End
If