Consulting

Results 1 to 3 of 3

Thread: Change From Print (Range) To Select (Range)

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Change From Print (Range) To Select (Range)

    After sorting the negative numbers to the top -this code loops through the sheet to the last row of negative numbers then send it to the printer. Works great, but I want to change it to select the negative number range rather than print it so I can copy and paste to another sheet.

    Any help?


    Thanks,


    Kurt


    Sheets("inventory").Select
        Range("A2:D650").Select
        Selection.Sort Key1:=Range("C2"), Order1:=xlAscending, Key2:=Range("D2") _
            , Order2:=xlAscending, Header:=xlNo, OrderCustom:=1, MatchCase:=False, _
            Orientation:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2:= _
            xlSortNormal
        Range("c65536").End(xlUp).Select
    While ActiveCell >= 0
        ActiveCell.Offset(-1, 0).Select
    Wend
    LastRow = ActiveCell.Row
    ActiveSheet.PageSetup.PrintArea = "$a$2:$d$" & LastRow
    'Application.ActivePrinter = "\\EARTH\Prodlaser on Ne02:"
        ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
            "\\EARTH\Prodlaser on Ne02:", Collate:=True
    Last edited by mark007; 06-04-2004 at 12:35 PM. Reason: Check out the VBA tags for formatting code :)

Posting Permissions

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