Macro to print multiple purchase orders

C

Cataryna

I have one file with 2 worksheets, One called PurchaseOrder (PO), the other
called PurchaseOrderData (POD). On the PO sheet I have the following:

Current Market Order 9
First Market Order to Print: 3(cell is named StartRow)
Last Market Order to Print: 6(cell is named EndRow)

I am having problems creating a macro that will print just the specified
purchase orders. Below is a macro that I copied from another help question.

Sub PrintPurchaseOrders()
'
' PrintPurchaseOrders Macro
' Prints selected range of Purchase Orders

Dim StartRow As Integer
Dim EndRow As Integer
Dim Msg As String

If StartRow > EndRow Then
Msg = "ERROR" & vbCrLf & "The starting row must be less than the ending
row!"
MsgBox Msg, vbCritical, APPNAME
End If

End Sub

I'm still having problems getting it to print. Nothing at all happens when
I click the button I have assigned the macro to. Help please.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top