ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Y or N option to print 1 of 2 schedule (https://www.excelbanter.com/excel-discussion-misc-queries/115811-y-n-option-print-1-2-schedule.html)

sjf0464 via OfficeKB.com

Y or N option to print 1 of 2 schedule
 
Hi,

In Excel, I would like to be able to have a cell that will print 1 of 2
schedules depending on whether we insert a 'Y' or a 'N'

A 'Y' inserted would print say schedule 1 and a 'N' will print schedule 2.


We already have a script that has a button that will print a number of
schedule that we run from, so will be able to add to this, hope this is
enough information.

--
Message posted via http://www.officekb.com


Don Guillett

Y or N option to print 1 of 2 schedule
 
Sub printoneortwo()
Range("scd" & InputBox("enter 1 or 2")).PrintPreview
End Sub

--
Don Guillett
SalesAid Software

"sjf0464 via OfficeKB.com" <u28215@uwe wrote in message
news:684070c6cd15a@uwe...
Hi,

In Excel, I would like to be able to have a cell that will print 1 of 2
schedules depending on whether we insert a 'Y' or a 'N'

A 'Y' inserted would print say schedule 1 and a 'N' will print schedule 2.


We already have a script that has a button that will print a number of
schedule that we run from, so will be able to add to this, hope this is
enough information.

--
Message posted via
http://www.officekb.com




Don Guillett

Y or N option to print 1 of 2 schedule
 
Sub printoneortwofromcell()
Select Case LCase(Range("c1").Value)
Case "y": ms = 1
Case "n": ms = 2
Case Else
End Select
ActiveSheet.Range("scd" & ms).PrintPreview
End Sub

--
Don Guillett
SalesAid Software

"sjf0464 via OfficeKB.com" <u28215@uwe wrote in message
news:684070c6cd15a@uwe...
Hi,

In Excel, I would like to be able to have a cell that will print 1 of 2
schedules depending on whether we insert a 'Y' or a 'N'

A 'Y' inserted would print say schedule 1 and a 'N' will print schedule 2.


We already have a script that has a button that will print a number of
schedule that we run from, so will be able to add to this, hope this is
enough information.

--
Message posted via
http://www.officekb.com





All times are GMT +1. The time now is 01:17 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com