F Felice Oct 16, 2003 #1 Does anyone know a vb code to print a specific page # if a certain cell is not null or has a specific value?
Does anyone know a vb code to print a specific page # if a certain cell is not null or has a specific value?
R Ron de Bruin Oct 16, 2003 #2 Try this It will print page 4 of Sheet1 if cell A1 have a value higher then 10 Sub test() With Sheets("Sheet1") If .Range("A1").Value > 10 Then .PrintOut from:=4, To:=4, _ Copies:=1, Collate:=True End If End With End Sub
Try this It will print page 4 of Sheet1 if cell A1 have a value higher then 10 Sub test() With Sheets("Sheet1") If .Range("A1").Value > 10 Then .PrintOut from:=4, To:=4, _ Copies:=1, Collate:=True End If End With End Sub
S Steve Smallman Oct 18, 2003 #3 Felice, assume cell to check is A1 if range("a1")="" or range("A1")=Your_Value then sheets(1).Printout from:=your_page, to:=your_page end if Throw this in the worksheet_change event, and it should work for you. Steve
Felice, assume cell to check is A1 if range("a1")="" or range("A1")=Your_Value then sheets(1).Printout from:=your_page, to:=your_page end if Throw this in the worksheet_change event, and it should work for you. Steve