![]() |
Apply a macro to all sheets - save me from hours and hours of work
Hello everyone, thank you for all your help! You guys are wonderful. I have
a new challange that I am faced with, a rather tedious one at that. I have a workbook that has 50+ worksheets. I need to change the print margins to 0 as well as the page orientation to portrait on every page. I can't program VBE but I recorded a macro that does what I need it to. I deleted all the stuff I didn't need and it works. However it only works on the worksheet that is open. What code do I add to make it cycle through every worksheet? I don't know how to program in VBE so please keep it simple. Thank you for your help in advance... I owe you guys a beer. |
Apply a macro to all sheets - save me from hours and hours of work
For Each sh In Activeworkbook.Worksheets
... your code Next sh and in you code change Activesheet to sh. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Excel'ed Failures" wrote in message ... Hello everyone, thank you for all your help! You guys are wonderful. I have a new challange that I am faced with, a rather tedious one at that. I have a workbook that has 50+ worksheets. I need to change the print margins to 0 as well as the page orientation to portrait on every page. I can't program VBE but I recorded a macro that does what I need it to. I deleted all the stuff I didn't need and it works. However it only works on the worksheet that is open. What code do I add to make it cycle through every worksheet? I don't know how to program in VBE so please keep it simple. Thank you for your help in advance... I owe you guys a beer. |
Apply a macro to all sheets - save me from hours and hours of
Bob, as always thank you. You really saved my bacon! This job would have
taken me all morning and to do and now I am finished. I love the, "How are you already finished!" reaction I got. Where ever you work Mr. Phillips you need a raise! "Bob Phillips" wrote: For Each sh In Activeworkbook.Worksheets ... your code Next sh and in you code change Activesheet to sh. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Excel'ed Failures" wrote in message ... Hello everyone, thank you for all your help! You guys are wonderful. I have a new challange that I am faced with, a rather tedious one at that. I have a workbook that has 50+ worksheets. I need to change the print margins to 0 as well as the page orientation to portrait on every page. I can't program VBE but I recorded a macro that does what I need it to. I deleted all the stuff I didn't need and it works. However it only works on the worksheet that is open. What code do I add to make it cycle through every worksheet? I don't know how to program in VBE so please keep it simple. Thank you for your help in advance... I owe you guys a beer. |
Apply a macro to all sheets - save me from hours and hours of
Okay, I will have a word with myself and see if I can get one <vbg
Bob "Excel'ed Failures" wrote in message ... Bob, as always thank you. You really saved my bacon! This job would have taken me all morning and to do and now I am finished. I love the, "How are you already finished!" reaction I got. Where ever you work Mr. Phillips you need a raise! "Bob Phillips" wrote: For Each sh In Activeworkbook.Worksheets ... your code Next sh and in you code change Activesheet to sh. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Excel'ed Failures" wrote in message ... Hello everyone, thank you for all your help! You guys are wonderful. I have a new challange that I am faced with, a rather tedious one at that. I have a workbook that has 50+ worksheets. I need to change the print margins to 0 as well as the page orientation to portrait on every page. I can't program VBE but I recorded a macro that does what I need it to. I deleted all the stuff I didn't need and it works. However it only works on the worksheet that is open. What code do I add to make it cycle through every worksheet? I don't know how to program in VBE so please keep it simple. Thank you for your help in advance... I owe you guys a beer. |
All times are GMT +1. The time now is 07:50 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com