Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Custom print macro

We have an Excel workbook that has 30 tabs in it. Depending on certai
conditions, we will not need to print every worksheet each time w
print. Need to define a macro that will look in a certain cell in eac
worksheet to determine if - it's "Y" go to the next worksheet, or i
it's "N", hide that worksheet. After the last worksheet, we will prin
entire workbook. After print, unhide all worksheets.

Thank you

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Custom print macro

for each sh in thisworkbook.Worksheets
if sh.Range("A1") = "N" then
sh.Visible = xlSheetHidden
end if
Next
ThisWorkbook.Printout
for each sh in thisworkbook.Worksheets
sh.Visible = xlSheetVisible
Next

--
Regards,
Tom Ogilvy

"BOXMAN100 " wrote in message
...
We have an Excel workbook that has 30 tabs in it. Depending on certain
conditions, we will not need to print every worksheet each time we
print. Need to define a macro that will look in a certain cell in each
worksheet to determine if - it's "Y" go to the next worksheet, or if
it's "N", hide that worksheet. After the last worksheet, we will print
entire workbook. After print, unhide all worksheets.

Thank you.


---
Message posted from http://www.ExcelForum.com/



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Custom print macro

Thanks Tom!

That worked great

--
Message posted from http://www.ExcelForum.com

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
Custom macro and custom button VLExcel New Users to Excel 1 April 10th 10 12:16 AM
2003 - 2007 custom macro and custom button restore. Scott Sornberger Excel Discussion (Misc queries) 11 May 23rd 08 02:41 PM
Custom Macro View/Print Toolbar for Calendar KC guru Excel Discussion (Misc queries) 0 February 21st 07 03:30 PM
Pivot Table macro to set print area and print details of drill down data Steve Haskins Excel Discussion (Misc queries) 2 December 28th 05 04:59 PM
Print custom ranges mkk[_3_] Excel Programming 0 March 2nd 04 06:54 PM


All times are GMT +1. The time now is 11:09 PM.

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"