Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Baltimore, MD, Maryland, USA
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How Can I Select a Dynamic Range

    Hi EXCEL VBA Folks:
    I have several dynamically defined ranges (using Offset and counta). How do I select them for Printing?
    I tried:

    Private Sub CommandButton3_Click()
    Sheets("ALL").Activate
    Range("A_Print_AN").Select
    Selection.PrintOut Copies:=1, Collate:=True
    End Sub

    I got an error with the Select part of the statement. I also tried:
    Private Sub CommandButton3_Click()
    Worksheets("ALL").PageSetup.PrintArea = _
    "A_Print_AN".Address
    ActiveAddress.PrintOut
    End Sub
    to no avail.
    I need some HELP.
    Stephen <img src=/S/grovel.gif border=0 alt=grovel width=31 height=23>

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How Can I Select a Dynamic Range

    I gave you an answer to the second half of your questions in the other thread where you asked it. However, it sounds like the named range is not properly named. You may have to send a sample workbook that shows what you are doing.
    Legare Coleman

  3. #3
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Baltimore, MD, Maryland, USA
    Posts
    254
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: How Can I Select a Dynamic Range

    Legare:
    This question is the same as part 2 (question 2) of Post#: 45868. There, we resolved that we can select and Print a Dynamically defined Range in VBA.
    Thanks

Posting Permissions

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