LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Printing Sheets that only include data

Greetings,

Having posted earlier, I was able to reduce my code thanks to grea
advice from this forum. However I have run into a problem-forgive m
repeating - as before, i have two colums on my Input sheet. The firs
column includes about 36 names that correspond to the sheets in m
workbook. The other column includes a formula to show the word "PRINT
or leave blank, depending on whether there is any data on the shee
with the name on the first column. In addition, I have named the cell
on the second column "UNITS" When i run the macro with the code show
below, I get a "Run-time error '9': Subscrip out of range" and the lin
"Worksheets(Units_Sht_Name).PrintOut Copies:=1, Collate:=True" i
highlighted in yellow.
Any help would be appreciated!

Thank you in advance

Sub printmac
For Each c In Worksheets("Input").Range("UNITS").Cells
If c.Value = "PRINT" Then
Units_Sht_Name = c.Offset(0, -1).Value
With Worksheets
With c.Font
.Bold = True
End With
Worksheets(Units_Sht_Name).PrintOut Copies:=1, Collate:=True
End With
End If
Next c

End Su

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

 
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
Include info from data source in data table but not in chart UHSH Admin Charts and Charting in Excel 1 February 26th 09 05:04 AM
HOw do I include "reminders"on my excel sheets? Armandoso Excel Discussion (Misc queries) 1 April 14th 08 04:44 AM
Printing Form to Include All Options in Excel LostAndConfused New Users to Excel 1 August 10th 07 07:49 PM
Printing sheets. Dabber Excel Worksheet Functions 2 June 5th 05 08:00 PM
Updating sheets to include new data beside old data ian123 Excel Programming 0 November 24th 03 10:37 PM


All times are GMT +1. The time now is 01:48 AM.

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

About Us

"It's about Microsoft Excel"