Hi All
I need some help in setting the print area on a worksheet that is not the active sheet.
I have a data sheet (sheet10) where the user is putting in all the data that will be used to print off a form which is sheet11 (I use the code name in case the user changes the name). The data is variable.
The code above works if i'm on sheet11, but will not work when I'm on sheet10, do I have to goto sheet11 (which I try not to do) then run the code or is there a way to set this from sheet 10?
Thanks
Simon
I need some help in setting the print area on a worksheet that is not the active sheet.
I have a data sheet (sheet10) where the user is putting in all the data that will be used to print off a form which is sheet11 (I use the code name in case the user changes the name). The data is variable.
VBA Code:
Sheet11.PageSetup.PrintArea = Sheet11.Range(Cells(1, "A"), Cells(llLastRow, "D")).Address
The code above works if i'm on sheet11, but will not work when I'm on sheet10, do I have to goto sheet11 (which I try not to do) then run the code or is there a way to set this from sheet 10?
Thanks
Simon