Setting non-contiguous print areas

S

sandy

Seems that I can't set non-contiguous print areas - I
thought that I could in the past! How do you set non-
contiguous print areas under Excel 2002?
 
R

Ron de Bruin

Hi sandy

Try this from Dave Peterson

You could do this
Insert a new worksheet (you're gonna use this for printing).
Do this for each area in your range.
select the range
Edit|copy
go to the new worksheet and Shift-click-Edit|Paste Picture Link.

go back and do the rest of the areas (copy|shift-click-Edit|paste picture Link).

What's neat about the picture is that if you change the original, the picture
will change, too (values and formatting!).

You could keep that new worksheet forever--just for printing--but if the ranges
change, you'll have a little work to do.


Or this

One way to print your selection with more areas on
one Page.

It will add a sheet and copy the selection areas on it
And delete that sheet after printing

Sub test()
Dim destrange As Range
Dim smallrng As Range
Dim newsh As Worksheet
Dim Ash As Worksheet
Set Ash = ActiveSheet
Set newsh = Worksheets.Add
Ash.Select

Set destrange = newsh.Cells(LastRow(newsh) + 1, 1)

For Each smallrng In Selection.Areas
smallrng.Copy
destrange.PasteSpecial xlPasteValues
Set destrange = newsh.Cells(LastRow(newsh) + 1, 1)
Next smallrng
newsh.PrintOut
Application.DisplayAlerts = False
newsh.Delete
Application.DisplayAlerts = True
End Sub

Public Function LastRow(sh As Worksheet)
On Error Resume Next
LastRow = sh.Cells.Find(What:="*", _
After:=sh.Range("A1"), _
Lookat:=xlPart, _
LookIn:=xlFormulas, _
SearchOrder:=xlByRows, _
SearchDirection:=xlPrevious, _
MatchCase:=False).Row
On Error GoTo 0
End Function
 

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