Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default convert multiple sheets into PDF

hi,

i have some code to convert multiple sheets to PDF. i can get up to 3
sheets into one PDF file, but when i do anything more than that it only
prints the last sheet selected instead of all of them. here is my sample:

Sheets(Array("VGA Summary", "1Q Test", "1N Test")).Select
ActiveWindow.SelectedSheets.PrintOut , ActivePrinter:="PDFCreator"

i would like to add more sheet names to the array, but when i do it wont work.

thanks in advance,
geebee

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default convert multiple sheets into PDF

I never used PDFCreator but you can do this

Sheets(Array("VGA Summary", "1Q Test", "1N Test")).Copy

Add your other sheets in the array

You have a new workbook now with all your sheet
create a pdf of this workbook and delete the file



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"geebee" (noSPAMs) wrote in message ...
hi,

i have some code to convert multiple sheets to PDF. i can get up to 3
sheets into one PDF file, but when i do anything more than that it only
prints the last sheet selected instead of all of them. here is my sample:

Sheets(Array("VGA Summary", "1Q Test", "1N Test")).Select
ActiveWindow.SelectedSheets.PrintOut , ActivePrinter:="PDFCreator"

i would like to add more sheet names to the array, but when i do it wont work.

thanks in advance,
geebee

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default convert multiple sheets into PDF

hi,

i am not sure what you mean by this. i mean what would be the code? is
there a better way to write the coee instead of using an array?

thanks in advance,
geebee


"Ron de Bruin" wrote:

I never used PDFCreator but you can do this

Sheets(Array("VGA Summary", "1Q Test", "1N Test")).Copy

Add your other sheets in the array

You have a new workbook now with all your sheet
create a pdf of this workbook and delete the file



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"geebee" (noSPAMs) wrote in message ...
hi,

i have some code to convert multiple sheets to PDF. i can get up to 3
sheets into one PDF file, but when i do anything more than that it only
prints the last sheet selected instead of all of them. here is my sample:

Sheets(Array("VGA Summary", "1Q Test", "1N Test")).Select
ActiveWindow.SelectedSheets.PrintOut , ActivePrinter:="PDFCreator"

i would like to add more sheet names to the array, but when i do it wont work.

thanks in advance,
geebee


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default convert multiple sheets into PDF

Something like this

Dim wb As Workbook
Sheets(Array("VGA Summary", "1Q Test", "1N Test")).Copy
Set wb = ActiveWorkbook

wb.PrintOut , ActivePrinter:="PDFCreator"

wb.Close False



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"geebee" (noSPAMs) wrote in message ...
hi,

i am not sure what you mean by this. i mean what would be the code? is
there a better way to write the coee instead of using an array?

thanks in advance,
geebee


"Ron de Bruin" wrote:

I never used PDFCreator but you can do this

Sheets(Array("VGA Summary", "1Q Test", "1N Test")).Copy

Add your other sheets in the array

You have a new workbook now with all your sheet
create a pdf of this workbook and delete the file



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"geebee" (noSPAMs) wrote in message ...
hi,

i have some code to convert multiple sheets to PDF. i can get up to 3
sheets into one PDF file, but when i do anything more than that it only
prints the last sheet selected instead of all of them. here is my sample:

Sheets(Array("VGA Summary", "1Q Test", "1N Test")).Select
ActiveWindow.SelectedSheets.PrintOut , ActivePrinter:="PDFCreator"

i would like to add more sheet names to the array, but when i do it wont work.

thanks in advance,
geebee


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 190
Default convert multiple sheets into PDF

hi,

i tried your code recommendation. basically what it did was copy the sheets
to a new workbook. now everything works fine as long as you have 3 sheets or
less. but when you have more than 3 sheets, only the last one is saved as
the pdf.
why is this?

thanks in advance,
geebee


"Ron de Bruin" wrote:

Something like this

Dim wb As Workbook
Sheets(Array("VGA Summary", "1Q Test", "1N Test")).Copy
Set wb = ActiveWorkbook

wb.PrintOut , ActivePrinter:="PDFCreator"

wb.Close False



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"geebee" (noSPAMs) wrote in message ...
hi,

i am not sure what you mean by this. i mean what would be the code? is
there a better way to write the coee instead of using an array?

thanks in advance,
geebee


"Ron de Bruin" wrote:

I never used PDFCreator but you can do this

Sheets(Array("VGA Summary", "1Q Test", "1N Test")).Copy

Add your other sheets in the array

You have a new workbook now with all your sheet
create a pdf of this workbook and delete the file



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"geebee" (noSPAMs) wrote in message ...
hi,

i have some code to convert multiple sheets to PDF. i can get up to 3
sheets into one PDF file, but when i do anything more than that it only
prints the last sheet selected instead of all of them. here is my sample:

Sheets(Array("VGA Summary", "1Q Test", "1N Test")).Select
ActiveWindow.SelectedSheets.PrintOut , ActivePrinter:="PDFCreator"

i would like to add more sheet names to the array, but when i do it wont work.

thanks in advance,
geebee





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default convert multiple sheets into PDF

Sorry I not know the program PDFCreator.

With the Excel 2007 program you can print the whole workbook
http://www.rondebruin.nl/pdf.htm
Do you not have a option to do this ?


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"geebee" (noSPAMs) wrote in message ...
hi,

i tried your code recommendation. basically what it did was copy the sheets
to a new workbook. now everything works fine as long as you have 3 sheets or
less. but when you have more than 3 sheets, only the last one is saved as
the pdf.
why is this?

thanks in advance,
geebee


"Ron de Bruin" wrote:

Something like this

Dim wb As Workbook
Sheets(Array("VGA Summary", "1Q Test", "1N Test")).Copy
Set wb = ActiveWorkbook

wb.PrintOut , ActivePrinter:="PDFCreator"

wb.Close False



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"geebee" (noSPAMs) wrote in message ...
hi,

i am not sure what you mean by this. i mean what would be the code? is
there a better way to write the coee instead of using an array?

thanks in advance,
geebee


"Ron de Bruin" wrote:

I never used PDFCreator but you can do this

Sheets(Array("VGA Summary", "1Q Test", "1N Test")).Copy

Add your other sheets in the array

You have a new workbook now with all your sheet
create a pdf of this workbook and delete the file



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"geebee" (noSPAMs) wrote in message ...
hi,

i have some code to convert multiple sheets to PDF. i can get up to 3
sheets into one PDF file, but when i do anything more than that it only
prints the last sheet selected instead of all of them. here is my sample:

Sheets(Array("VGA Summary", "1Q Test", "1N Test")).Select
ActiveWindow.SelectedSheets.PrintOut , ActivePrinter:="PDFCreator"

i would like to add more sheet names to the array, but when i do it wont work.

thanks in advance,
geebee



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to update data from multiple sheets to one specific sheets Khawajaanwar Excel Discussion (Misc queries) 4 January 15th 10 07:31 AM
Convert multiple excel files with multiple sheets to PDF - how? Phil J W Excel Discussion (Misc queries) 3 November 5th 09 02:16 PM
Excel Convert Multiple Rows into Multiple Columns [email protected] Excel Programming 5 June 29th 07 06:01 AM
Excel Convert Multiple Rows into Multiple Columns [email protected] Excel Worksheet Functions 1 June 28th 07 05:20 AM
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA Amaxwell Excel Worksheet Functions 4 August 17th 06 06:23 AM


All times are GMT +1. The time now is 06:32 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"