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
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