Hi,
I having troubles getting a part of this script to do what I want and was hoping someone could point out what to try.
What I need is when the user is asked to enter the amount of pallets. The number they input is placed into a cell.
Here is the problem.
I'm looking for a way to start at number 1 and work up to the number the user placed in the input box.
For example if the user put 5 in the input box Range("F37") Would read 5 then in range("A37") the number would read 1.
Then the page would print ,the next value in Range("A37") would be 2 ,then print and so on up to 5
So the end result I would have 5 pages that printed with the only differnce being Range("A37") Value being 1,2,3,4,5 .
Can someone help
Thanks as always, Mike
Here is the complete code. Problem is in the pallet code near the bottom.
Sub Lable()
Dim strName As String
Dim cel As Range
strName = InputBox(Prompt:="Please Enter Lable", _
Title:="Lable", Default:="AE")
If strName = "Your Name here" Or _
strName = vbNullString Then
Exit Sub
Else
Set cel = Range("B4")
cel.FormulaR1C1 = strName
End If
Call Item_Number
End Sub
Sub Item_Number()
Dim cel As Range, dnumber As String
dnumber = Application.InputBox(Prompt:="Enter Item Number", Title:="Item Number ?", Type:=1)
Set cel = Range("F4")
cel.FormulaR1C1 = dnumber
Call Case_Qty
End Sub
Sub Case_Qty()
Dim cel As Range, dnumber As String
dnumber = Application.InputBox(Prompt:="Enter Case Qty", Title:="Case Qty ?", Type:=1)
Set cel = Range("A21")
cel.FormulaR1C1 = dnumber
Call Pallets
End Sub
Sub Pallets()
Dim cel As Range, dnumber As String
Dim PrintPage
dnumber = Application.InputBox(Prompt:="Enter Total Pallets", Title:="Total Pallets ?", Type:=1)
Set cel = Range("F37")
cel.FormulaR1C1 = dnumber
PrintPage = dnumber
If PrintPage <> "" Then
ActiveWindow.SelectedSheets.PrintOut From:=PrintPage, To:=PrintPage, Copies:=1
End If
End Sub
Bookmarks