Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have to modify the following code to exclude one sheet out of 110 pages.
Is there an easy way to do this. What I would be modifying would be the Sheets(Array("Page 1", "Page 2", "Page 3")).Select Sub Macro4() Sheets(Array("Page 1", "Page 2", "Page 3")).Select Sheets("Page 1").Activate ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _ "V:\ACMP\Contract Summaries\Maximum Solutions II\EA version\" & Range("inpdate1").Value & "\IM-006344_EA_" & Range("inpdate1").Value & ".pdf", _ Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _ :=False, OpenAfterPublish:=False End Sub Thanks in advance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Brad, try this:
Sub TestSelect() Dim sh As Object Dim shAr() As String Dim cnt As Long ReDim shAr(0 To ActiveWorkbook.Sheets.Count - 2) cnt = 0 For Each sh In ActiveWorkbook.Sheets If sh.Name < "Sheet2" Then shAr(cnt) = sh.Name cnt = cnt + 1 End If Next Sheets(shAr).Select End Sub -- Charles Chickering "A good example is twice the value of good advice." "Brad" wrote: I have to modify the following code to exclude one sheet out of 110 pages. Is there an easy way to do this. What I would be modifying would be the Sheets(Array("Page 1", "Page 2", "Page 3")).Select Sub Macro4() Sheets(Array("Page 1", "Page 2", "Page 3")).Select Sheets("Page 1").Activate ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _ "V:\ACMP\Contract Summaries\Maximum Solutions II\EA version\" & Range("inpdate1").Value & "\IM-006344_EA_" & Range("inpdate1").Value & ".pdf", _ Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _ :=False, OpenAfterPublish:=False End Sub Thanks in advance. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you!!
"Charles Chickering" wrote: Brad, try this: Sub TestSelect() Dim sh As Object Dim shAr() As String Dim cnt As Long ReDim shAr(0 To ActiveWorkbook.Sheets.Count - 2) cnt = 0 For Each sh In ActiveWorkbook.Sheets If sh.Name < "Sheet2" Then shAr(cnt) = sh.Name cnt = cnt + 1 End If Next Sheets(shAr).Select End Sub -- Charles Chickering "A good example is twice the value of good advice." "Brad" wrote: I have to modify the following code to exclude one sheet out of 110 pages. Is there an easy way to do this. What I would be modifying would be the Sheets(Array("Page 1", "Page 2", "Page 3")).Select Sub Macro4() Sheets(Array("Page 1", "Page 2", "Page 3")).Select Sheets("Page 1").Activate ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _ "V:\ACMP\Contract Summaries\Maximum Solutions II\EA version\" & Range("inpdate1").Value & "\IM-006344_EA_" & Range("inpdate1").Value & ".pdf", _ Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _ :=False, OpenAfterPublish:=False End Sub Thanks in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Page break or Fit to Page Macro | Excel Worksheet Functions | |||
Page macro | Excel Discussion (Misc queries) | |||
Fit to page macro | Excel Programming | |||
Macro that copy page to page just some filled cells | Excel Discussion (Misc queries) | |||
Fit to page in macro | Excel Programming |