Results 1 to 18 of 18

Thread: Help with a VBA Print Range Code Problem

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #9
    BoardCoder
    Licensed Coder
    VBAX Expert mark007's Avatar
    Joined
    May 2004
    Location
    Leeds, UK
    Posts
    620
    Location
    i.e.

    Sub SetPrintRanges(StartCell As String) 
    For i = 1 To Sheets.Count 
        Worksheets(i).PageSetup.PrintArea = startcell & ":" & _
        Worksheet(i).Cells.SpecialCells(xlCellTypeLastCell).Address
    Next i 
    End Sub

    Last edited by Aussiebear; 04-29-2023 at 06:46 PM. Reason: Adjusted the code tags
    "Computers are useless. They can only give you answers." - Pablo Picasso
    Mark Rowlinson FIA | The Code Net

Posting Permissions

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