(Solved) – Auto submit Excel print forms

(solved)-–-auto-submit-excel-print-forms

TLDR: Can I auto submit print dialog with VBA?

I have an Excel table with products data with columns [numberOfCopies, name, size, weight, price] – max 30 products (30 rows for different items).

I have a VBA macro copies data from that table to other, special “Label” spreadsheet, selects area and opens print dialog box to print as many copies as I want.

ActiveSheet.Range("A1:D7").Select
Application.Dialogs(xlDialogPrint).Show , , , numberOfCopies, , , , , , , , 1 

As it works right now:

  • I press “Print All” button that fires macro
  • For each table row:
  • It checks if there are product information in row
  • If yes: copy data to label and open xlDialogPrint

The effect is i need to press 1 button, and then press enter X times, 1 time for each row, to submit print dialog. Is there a way to auto submit dialog box, so I just press 1 button?

Leave a Reply

Your email address will not be published. Required fields are marked *