Y or N option to print 1 of 2 schedule

  • Thread starter sjf0464 via OfficeKB.com
  • Start date
S

sjf0464 via OfficeKB.com

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.
 
D

Don Guillett

Sub printoneortwo()
Range("scd" & InputBox("enter 1 or 2")).PrintPreview
End Sub
 
D

Don Guillett

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
 
Top