Create command button to print multiple worksheets in a excel file
I have never worked with a macro in excel.
I have a file with 5 worksheets. I want to create a command button in Worksheet 1 so I can print worksheets 2 through 4 all together. Please help. Marco |
Create command button to print multiple worksheets in a excel file
You can use a one liner to do this (array)
http://www.rondebruin.nl/print.htm#Print -- Regards Ron de Bruin http://www.rondebruin.nl "MarcoR" wrote in message ... I have never worked with a macro in excel. I have a file with 5 worksheets. I want to create a command button in Worksheet 1 so I can print worksheets 2 through 4 all together. Please help. Marco |
Create command button to print multiple worksheets in a excel
I have tried the sheets array code, but I keep getting an error "Runtime
error 9: Sub-script out of range." Any recommendations? "Ron de Bruin" wrote: You can use a one liner to do this (array) http://www.rondebruin.nl/print.htm#Print -- Regards Ron de Bruin http://www.rondebruin.nl "MarcoR" wrote in message ... I have never worked with a macro in excel. I have a file with 5 worksheets. I want to create a command button in Worksheet 1 so I can print worksheets 2 through 4 all together. Please help. Marco |
Create command button to print multiple worksheets in a excel
That could indicate that you don't have one or more of the sheets in the array.
Check the spelling on the sheetnames and in your macro. Gord Dibben MS Excel MVP On Mon, 26 Jun 2006 09:59:01 -0700, jd1 wrote: I have tried the sheets array code, but I keep getting an error "Runtime error 9: Sub-script out of range." Any recommendations? "Ron de Bruin" wrote: You can use a one liner to do this (array) http://www.rondebruin.nl/print.htm#Print -- Regards Ron de Bruin http://www.rondebruin.nl "MarcoR" wrote in message ... I have never worked with a macro in excel. I have a file with 5 worksheets. I want to create a command button in Worksheet 1 so I can print worksheets 2 through 4 all together. Please help. Marco |
All times are GMT +1. The time now is 10:40 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com