发布网友 发布时间:2022-04-25 16:04
共2个回答
热心网友 时间:2023-10-15 21:09
Private Sub CommandButton1_Click()
Dim i As Integer
Dim sh1 As Worksheet, sh2 As Worksheet
Set sh1 = ThisWorkbook.Sheets("打印")
For i = 2 To sh1.Range("E65536").End(xlUp).Row
sh1.Range("A3").Value = sh1.Cells(i, 5)
sh1.Range("B3").Value = sh1.Cells(i, 6)
sh1.Range("C3").Value = sh1.Cells(i, 7)
sh1.Range("D3").Value = sh1.Cells(i, 8)
sh1.Range("A1:D3").PrintOut
DoEvents
Next i
Set sh1 = Nothing
End Sub
热心网友 时间:2023-10-15 21:10
你说的是每打印一次,就从E:H列提取新的数据到A3:D3?