【正文】
C列對應(yīng)D列對應(yīng)E列對應(yīng)5,依此類推,打印時間是控制每打一張表所須時間,單位為毫秒(ms)。當把值設(shè)為0時,對應(yīng)單元格的內(nèi)容不變,以便靈活應(yīng)用,須把要打印的表放到C盤,放到別處須要改變程序。然后在其中輸入如下程序:Option Explicit Public uint As Integer 39。單位名稱 Public goods As Integer 39。設(shè)備名稱 Public number As Integer 39。設(shè)備編號 Public address As Integer 39。出廠地址 Public modle As Integer 39。設(shè)備型號 Public reference As Integer 39。參考 Public result As Integer 39。檢定結(jié)果 Public dates As Integer 39。檢定日期 Public death As Integer 39。檢定日期 Public cel As Integer 39。打印張數(shù) Public time As Integer 39。打印時間Private Sub Command1_Click() End SubPrivate Sub Command3_Click() uint = Val() 39。單位名稱 goods = Val() 39。設(shè)備名稱 modle = Val() 39。設(shè)備型號 address = Val() 39。出廠地址 number = Val() 39。設(shè)備編號 reference = Val() 39。參考 result = Val() 39。檢定結(jié)果 dates = Val() 39。檢定日期 time = Val() 39。打印時間 death = Val() 39。有效期至 MsgBox !^^ 參數(shù)修改成功^^!End SubPrivate Sub Form_Initialize() 39。數(shù)據(jù)初始化 cel = 1 39。打印張數(shù) uint = 1 39。單位名稱 goods = 2 39。設(shè)備名稱 number = 3 39。設(shè)備編號 address = 4 39。出廠地址 modle = 5 39。設(shè)備型號 reference = 6 39。參考 result = 7 39。檢定結(jié)果 dates = 8 39。檢定日期 death = 9 39。有效期至 time = 2000 39。打印時間間隔End SubPrivate Sub Command2_Click()EndEnd Sub建立一個FORM1,界面如下:然后在其中輸入如下程序:Dim excel As ObjectDim workbook As ObjectDim sheet As ObjectDim present%Private Sub Command1_Click() 39。打開EXCLE表格 If Dir(C:\) = Then Set excel = CreateObject()