nicnad
04-23-2012, 08:37 AM
Hi,
I have the following code in thisworbook module :
Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "Matrix_EN" Then Sheets(Array("Legend_EN", "Matrix_EN")).Select
If ActiveSheet.Name = "Matrix_FR" Then Sheets(Array("Legend_FR", "Matrix_FR")).Select
End Sub
I have insterted this code because I want to force the user to print those two page without noticing.
The thing is, if the user uses print preview or print a sheet and goes to another one, those two sheets are still selected and it causes errors.
Is there a way to unselect all sheet after print or print preview or another workaround to force user to print two sheets?
Thank you for your help.
I have the following code in thisworbook module :
Private Sub Workbook_BeforePrint(Cancel As Boolean)
If ActiveSheet.Name = "Matrix_EN" Then Sheets(Array("Legend_EN", "Matrix_EN")).Select
If ActiveSheet.Name = "Matrix_FR" Then Sheets(Array("Legend_FR", "Matrix_FR")).Select
End Sub
I have insterted this code because I want to force the user to print those two page without noticing.
The thing is, if the user uses print preview or print a sheet and goes to another one, those two sheets are still selected and it causes errors.
Is there a way to unselect all sheet after print or print preview or another workaround to force user to print two sheets?
Thank you for your help.