|
-
Jan 17th, 2003, 07:21 AM
#1
Thread Starter
Lively Member
Printing Excel Spreadsheet
I'm attempting to print one or two sheets on an Excel Spreadsheet. I have a "Type Mismatch" when the line
"If Range("C9:J37") <> " " Then" is read. What I'm attempting
to query is "If the second sheet contains values in the range C9:J37 then, so that the sheet may be printed if there is values.
Would someone out there supply me with the correct string?
<vbcode>
'Select Sheet 2 for viewing.
Sheets("SheetTwo").Select
'If Sheet 2 contains inputed values.
If Range("C9:J37") <> " " Then
'Print Workbook.
ActiveWorkbook.PrintOut Copies:=1, Collate:=True
Else
Sheets("SheetOne").Select
'Print Selected Sheet [SheetOne].
ActiveWindow.SelectedSheets.PrintOut Copies:=1, Collate:=True
End If
<vbcode>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|