Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 66
Default force print of another sheet

I have a dumb user who keeps forgetting to change from the input sheet to the
report before doing File Print. Is there anyway I can set the menu to print a
range on the other sheet?
Can I do this without writing any code?
If not can I change the default action of a menu item, or do I remove it and
then replaceit withj my own code? But if I do thatthen I have to also write
code to swap between std and my menu.
It'll be easier to put a button on the sheet, which is quite straight
forward as Ihave frozen panes.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,718
Default force print of another sheet

I'd suggest a little code. Go to the ThisWorkbook module of the workbook in
the VBE and paste this in. Modify the worksheet names as needed.

Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim Resp As Integer
If ActiveSheet.Name = "Input" Then
Resp = MsgBox("Do you want to print the Report sheet instead of
Input?", vbYesNoCancel)
Select Case Resp
Case vbYes
Cancel = True
Application.EnableEvents = False
Worksheets("Reports").PrintOut
Application.EnableEvents = True
Case vbCancel
Cancel = True
End Select
End If
End Sub


--
Jim
"Graham Y" wrote in message
...
I have a dumb user who keeps forgetting to change from the input sheet to
the
report before doing File Print. Is there anyway I can set the menu to
print a
range on the other sheet?
Can I do this without writing any code?
If not can I change the default action of a menu item, or do I remove it
and
then replaceit withj my own code? But if I do thatthen I have to also
write
code to swap between std and my menu.
It'll be easier to put a button on the sheet, which is quite straight
forward as Ihave frozen panes.



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 force clearing of print buffer without restart. Steve Excel Discussion (Misc queries) 1 August 1st 09 05:24 PM
Force excel to open on a specific sheet harwookf Excel Worksheet Functions 5 November 16th 07 04:48 PM
Print Breaks-Automatic or Force New Tracy Excel Worksheet Functions 1 March 23rd 06 12:17 AM
Print dialog - force it to show up? [email protected][_2_] Excel Programming 5 May 24th 05 08:40 PM
Force Delete a Sheet Michael Kintner Excel Programming 4 January 5th 04 08:05 PM


All times are GMT +1. The time now is 02:24 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"