hardrock14

New Member
Joined
Jan 21, 2019
Messages
1
I've been scouring the forms but cant find what i need. I'm creating a label printer for my job and we print dozens of labels at once.

I need a VBA macro that will do the following:
1: ask how many labels to print
2: ask what number to start with
3: change the value in cell f2 to the start number (formatted 00#)
4: add 1 to f2 for every copy printed

I've pieced together this: but it only works if i enter 1 as the start number. I assume it has somethign to do with the "type" in that app.

Sub PrintCopies_ActiveSheet()

Dim CopiesCount As Long
Dim copynumber As Long

CopiesCount = Application.InputBox("How many copies do you want?", Type:=1)
'Now the program wants you to input how many pages you like to print.
'You can input 100 here.

StartCount = Application.InputBox("What number should we start with??", Type:=1)


For copynumber = StartCount To CopiesCount
With ActiveSheet
.Range("F2").Value = copynumber 'I assume your invoice number is in cell E1.
.PrintOut 'Print the sheet
End With
Next copynumber
End Sub

Any help would be appreciated
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college

Forum statistics

Threads
1,214,415
Messages
6,119,382
Members
448,889
Latest member
TS_711

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top