Vb code to print a page #

F

Felice

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

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

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top