printing Union of Ranges

  • Thread starter Thread starter anny
  • Start date Start date
A

anny

Hello

I can't figure out why this doesn't work. It gives a PrintPreview of my
whole table, A1:N27. What I want is a table with 6 adjacent columns A B C D
G H.

Dim Range1 As Range
Dim Range2 As Range
Dim RangeCombined As Range
Set Range1 = Range("$A$1:$D$27")
Set Range2 = Range("$G$1:$H$27")
Set RangeCombined = Union(Range1, Range2)

ActiveSheet.PageSetup.PrintArea = RangeCombined
ActiveSheet.PrintOut preview:=True

thks
anny
 

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

Back
Top