'两天不睡着完成4万余名学生的基本信息表格
Option Explicit
Dim i
Private Sub Command1_Click()
Timer1.Enabled = True
Timer2.Enabled = True
'Draw
Dim maktap, isim, kimlik, yillik, sinip
Dim xlsApp As Excel.Application
Dim xlsWorkbook As Excel.Workbook
Dim xlssheet As Excel.Worksheet
Set xlsApp = CreateObject(“Excel.Application”)
Set xlsWorkbook = xlsApp.Workbooks.Open(“D:\bak\汇总\学生信息统计表.xlsx”)
Set xlssheet = xlsWorkbook.Worksheets(1)
xlsApp.Visible = False
'For i = 3 To 39619
i = 19170
Do While i <= 39619
i = i + 1
Me.Progress2.Refresh
Me.Progress1.Refresh
Progress2.Percent = i / 39616 * 100
Progress1.Percent = i / 39616 * 100
lblUpload.Caption = "文件正在生成中: " & Progress2.Percent & “%”
lblUpload.Refresh
xlsWorkbook.Sheets(1).Cells(3, 2) = xlsWorkbook.Sheets(2).Ce