Hi anyone,
I’m trying figure out a standard module macro code that would first;
Copy the cell value of “O6†from the active sheet and paste in “previous†sheet’s cell value O6 if the cell “M10†contains any text other than the text “Otherâ€.
And then print the active sheet.
Call the macro Sub SaveConsReceipt()
And then print the sheet “previousâ€
Clear the cell value O6 from the sheet “previousâ€
Any help on this would be kindly appreciated.
Thanks in advance.
Printing two sheets simulataneously
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Printing two sheets simulataneously
Best Regards,
Adam
Adam
-
- Administrator
- Posts: 78513
- Joined: 16 Jan 2010, 00:14
- Status: Microsoft MVP
- Location: Wageningen, The Netherlands
Re: Printing two sheets simulataneously
Code: Select all
Sub Print2()
Dim n As Long
n = ActiveSheet.Index
If n = 1 Then
MsgBox "This is the first sheet!", vbExclamation
Exit Sub
End If
If ActiveSheet.Range("M10") <> "Other" Then
ActiveSheet.Previous.Range("O6") = ActiveSheet.Range("O6")
End If
ActiveSheet.PrintOut
Call SaveConsReceipt
ActiveSheet.Previous.PrintOut
ActiveSheet.Previous.Range("O6").ClearContents
End Sub
Best wishes,
Hans
Hans
-
- SilverLounger
- Posts: 2347
- Joined: 23 Feb 2010, 12:07
Re: Printing two sheets simulataneously
Thanks for the help Hans. I do really appreciate it.
Best Regards,
Adam
Adam