I have a simple purchase order that has two buttons. One button print/save, I have that working Okay. The other button I want to use a message box to ask if you want a new purchase order, if no is selected exit sub. If yes is clicked, it needs to clear certain cells and add one to a cell to create the new invoice.
I can get these to work individually, but not on the same button.
Appreciate some help!
I have attached the file...it does have a macro.
OR
Below is VBA:
Private Sub CommandButton2_Click()
Dim NewInvoice
MsgBox "New Invoice", (vbYesNo), ("Clear Contents")
If NewInvoice = "" Then Exit Sub
Range("I1").Value = NewInvoice
NewInvoice = "I1" + 1
With NewInvoice("BD_ORDER_FORM")
.Range("b5,b6,b8,b10,b11,f13:g42").ClearContents
End With
End Sub
Bookmarks