View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Don Guillett Don Guillett is offline
external usenet poster
 
Posts: 10,124
Default print sheets from a range with names

Glad to help

--
Don Guillett
SalesAid Software

"cbm" wrote in message
ups.com...
THANKS A LOT, DON!!! Great job.
WORKS PERFECT.

As names came from a formula, i addapted it as:

Private Sub CommandButton2_Click()
Range("FJ1").Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Range("FK1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Selection.Sort Key1:=Range("FK1"), Order1:=xlDescending,
Header:=xlGuess _
, OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("d1021").Select
For Each c In Sheets("Est").Range("fk1:fk1000")
On Error Resume Next
Worksheets(c.Value).PrintPreview
Next c

End Sub



Don Guillett ha escrito:

Or shorter

Sub doshts()
For Each c In Sheets("sheet1").Range("a2:a3")
Worksheets(c.Value).PrintPreview
Next c
End Sub
--
Don Guillett
SalesAid Software

"cbm" wrote in message
ups.com...
I´ve got a list of certain sheet name´s and i need a command button
to print or preview only that sheets.
Example:

a1 Sheet3
a2 Sheet7
a3 Sheet10
...


Any idea???

Thanks a lot