View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Which sheet will be printed?

When a sheet is printed, it becomes the activesheet, albeit temporarily, so
you can address the activesheet wherever it is done from.

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Saniya" wrote in message
oups.com...
Hello Gurus!

Is there a way to know which sheet is going to print?
I want to add a code to Cell A1 before the sheet is printed.

by creating an Addin I can do it if the user prints the active sheet.

But in case the user prints a sheet by using code like
sheets("Sheet2").printout and running it from sheet1 then how I cud
enter a value in cell A1?

Thanks