View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
sharkfoot sharkfoot is offline
external usenet poster
 
Posts: 1
Default Print a sheet without ever selecting the sheet


I have a worksheet titled TNT and in this worksheet, I have a button to
print the print area of a sheet that is titled Variables.


Code:
--------------------
Sub PrintVariables()

Sheets("Variables").Select
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
Sheets("TNT").Select
End Sub

--------------------


I recorded the above macro simply enough, but what I want is to print
the Variables tab without ever selecting the variables tab like it
currently does.

In other words, I want the button that runs this macro to print the
Variables tab without ever leaving the TNT tab.

How do I make the rquired changes?


--
sharkfoot
------------------------------------------------------------------------
sharkfoot's Profile: http://www.excelforum.com/member.php...o&userid=32164
View this thread: http://www.excelforum.com/showthread...hreadid=522334