Thread: Print
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default Print

Something like:

Option Explicit
Sub testme()
With ActiveSheet
.PrintOut from:=1, to:=.Range("ah42").Value, preview:=True
End With
End Sub

You may want to verify that that range holds a nice valid number, too.

Chey wrote:

I want to put a command button on my excel spreadsheet. I have how many
pages in a cell example in cell AH42 will say 3. How do I tell it to print
pages 1-(whatever the number in AH42) is?
Thanks
Cheyenne


--

Dave Peterson