![]() |
Macro to print multiple purchase orders
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. |
Macro to print multiple purchase orders
I'd start at Debra Dalgleish's site:
http://contextures.com/xlForm03.html and even http://contextures.com/xlForm02.html Cataryna wrote: 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. -- Dave Peterson |
All times are GMT +1. The time now is 09:37 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com