Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

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


try
application.screenupdating=false
before
Sheets("Variables").Select


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

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


Works perfectly. Thank you very much!


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

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Print a sheet without ever selecting the sheet

Sub PrintVariables()
Sheets("Variables").Printout
End Sub

--
Regards,
Tom Ogilvy


"sharkfoot" wrote
in message ...

Works perfectly. Thank you very much!


--
sharkfoot
------------------------------------------------------------------------
sharkfoot's Profile:

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



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to print a master sheet together with another sheet jean dezille Excel Discussion (Misc queries) 0 January 17th 10 10:11 AM
VBA to count rows in a sheet and increase counter on another sheet then print lgj32 Excel Programming 1 February 19th 06 10:57 AM
How do I copy a print format from sheet to sheet in excel ? kernat Excel Discussion (Misc queries) 1 July 22nd 05 04:59 PM
I want to print out the sheet tabs (sheet names) Sundus Excel Worksheet Functions 3 February 23rd 05 08:34 PM
after each print, copy data from sheet 1 to sheet 2 tvtrav Excel Programming 6 April 6th 04 06:00 PM


All times are GMT +1. The time now is 03:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"