Monkeyboyz
New Member
- Joined
- Sep 30, 2010
- Messages
- 10
I have done this before but just can't remember how to do it.
I have a dynamic range that is a list of some of the tabs I have in a worksheet. I need to turn that range into an array so I can then select it all with the following Sub and create a pdf.
The dynamic range contains the tabs Wall 1, Wall 2 etc. I can create it like I have below but the range continually changes
I have a dynamic range that is a list of some of the tabs I have in a worksheet. I need to turn that range into an array so I can then select it all with the following Sub and create a pdf.
The dynamic range contains the tabs Wall 1, Wall 2 etc. I can create it like I have below but the range continually changes
Code:
Sub CreatePDF()
ThisWorkbook.Sheets(Array("Wall 1", "Wall 2", "Wall 3", "Wall 4")).Select
Sheets("Wall 1").Activate
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:="C:\temp\temp.pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
Sheets("Wall 1").Select
Range("A1").Select
End Sub