PC Review


Reply
Thread Tools Rate Thread

convert multiple sheets into PDF

 
 
geebee
Guest
Posts: n/a
 
      11th Mar 2008
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 With Quote
 
 
 
 
Ron de Bruin
Guest
Posts: n/a
 
      11th Mar 2008
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" <(E-Mail Removed)(noSPAMs)> wrote in message news:70EBB614-5D5E-4C5D-9B30-(E-Mail Removed)...
> 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 With Quote
 
geebee
Guest
Posts: n/a
 
      11th Mar 2008
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" <(E-Mail Removed)(noSPAMs)> wrote in message news:70EBB614-5D5E-4C5D-9B30-(E-Mail Removed)...
> > 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 With Quote
 
Ron de Bruin
Guest
Posts: n/a
 
      11th Mar 2008
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" <(E-Mail Removed)(noSPAMs)> wrote in message news:A0AF8977-495C-40AE-99A9-(E-Mail Removed)...
> 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" <(E-Mail Removed)(noSPAMs)> wrote in message news:70EBB614-5D5E-4C5D-9B30-(E-Mail Removed)...
>> > 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 With Quote
 
geebee
Guest
Posts: n/a
 
      11th Mar 2008
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" <(E-Mail Removed)(noSPAMs)> wrote in message news:A0AF8977-495C-40AE-99A9-(E-Mail Removed)...
> > 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" <(E-Mail Removed)(noSPAMs)> wrote in message news:70EBB614-5D5E-4C5D-9B30-(E-Mail Removed)...
> >> > 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 With Quote
 
Ron de Bruin
Guest
Posts: n/a
 
      11th Mar 2008
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" <(E-Mail Removed)(noSPAMs)> wrote in message news:2FCB1F61-BB61-49A2-9FC1-(E-Mail Removed)...
> 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" <(E-Mail Removed)(noSPAMs)> wrote in message news:A0AF8977-495C-40AE-99A9-(E-Mail Removed)...
>> > 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" <(E-Mail Removed)(noSPAMs)> wrote in message news:70EBB614-5D5E-4C5D-9B30-(E-Mail Removed)...
>> >> > 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to update data from multiple sheets to one specific sheets Khawajaanwar Microsoft Excel Misc 4 15th Jan 2010 07:31 AM
Convert multiple excel files with multiple sheets to PDF - how? Phil J W Microsoft Excel Misc 5 5th Nov 2009 07:43 PM
Protect sheets not allowing entering of data in multiple sheets Suzette Microsoft Excel Discussion 0 25th Sep 2006 11:55 PM
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA Amaxwell Microsoft Excel Worksheet Functions 4 17th Aug 2006 06:23 AM
Help with copying data from multiple sheets to multiple sheets Randy Reese Microsoft Excel Programming 1 18th Mar 2004 10:02 PM


Features
 

Advertising
 

Newsgroups
 


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