Current location - Trademark Inquiry Complete Network - Trademark inquiry - excel vba! The problem is as follows: There are 100 kinds of trademarks that need to be printed in batches, and the number of trademarks that need to be printed is different.
excel vba! The problem is as follows: There are 100 kinds of trademarks that need to be printed in batches, and the number of trademarks that need to be printed is different.

When printing, does one trademark occupy one page?

As shown in the picture above, insert an ActiveX control button, double-click the button, and write the following program code:

Private Sub CommandButton1_Click()

For i = 1 To 100

For j = 1 To Range("B" & i)

Range("A" & i).PrintOut

Next

Next

End Sub

Cancel the "Design Mode" and click the button to batch print in the way you want