Hi, is there a way of making the following more efficient:
Basically, I am exporting a selection of pages from a workbook. THe selection is determined by the following
If Sheets("input sheet").Range("b47") = 2 Then
The value in B47 will either be a 0,1,2
2 - selects minimum range, plus two additional sheets
1 - selects minimum range, plus one additional sheet
0 - selects minimum range only.
the code is:
If Sheets("input sheet").Range("b47") = 2 Then
Sheets(Array("validation", "Cover Sheet", "Management Report", "Management Accounts", _
"Balance Sheet", "Tax projection - Director 1", "Tax projection - Director 2")). _
Select
Selection.Activate
End If
'if one director is to receive a personal tax projection
If Sheets("input sheet").Range("b47") = 1 Then
Sheets(Array("validation", "Cover Sheet", "Management Report", "Management Accounts", _
"Balance Sheet", "Tax projection - Director 1")). _
Select
Selection.Activate
End If
If Sheets("input sheet").Range("b47") = 0 Then
Sheets(Array("validation", "Cover Sheet", "Management Report", "Management Accounts", _
"Balance Sheet")). _
Select
Selection.Activate
End If
after which point a pdf is generated.
as always thank you in advance.
Bookmarks