+ Reply to Thread
Results 1 to 3 of 3

printing Union of Ranges

  1. #1
    anny
    Guest

    printing Union of Ranges

    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



  2. #2
    Gary''s Student
    Guest

    RE: printing Union of Ranges

    Hide cols E & F
    --
    Gary''s Student


    "anny" wrote:

    > 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
    >
    >
    >


  3. #3
    Gary''s Student
    Guest

    RE: printing Union of Ranges

    Also make the range contiguous.
    --
    Gary''s Student


    "Gary''s Student" wrote:

    > Hide cols E & F
    > --
    > Gary''s Student
    >
    >
    > "anny" wrote:
    >
    > > 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
    > >
    > >
    > >


+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1