Macro to define a print area - Page 2

Solved
Previous
  • 1
  • 2
  1. Le Pingou Posted messages 12275 Registration date   Status Contributor Last intervention   1 477
     
    Hello,
    Yes, with one detail: according to your information: column 16 contains the calculations and the data is entered in a row from column 1 to 15
    I took column 1 or [A] instead of 2
    So the procedure is:
    Sub DefinePrintArea()
    ' search for the last row in column [A:A]
    With ActiveSheet.PageSetup
    .PrintTitleRows = "$5:$12"
    .PrintArea = ("$A$1:$S$" & Cells(Rows.Count, 1).End(xlUp).Row)
    End With
    ActiveSheet.PrintOut
    End Sub


    --
    Best regards.
    The Penguin
    0
  2. marc41000 Posted messages 58 Registration date   Status Member Last intervention  
     
    Thank you, I will try this this weekend

    thanks again
    0
  3. marc41000 Posted messages 58 Registration date   Status Member Last intervention  
     
    Hello

    thank you very much, it works

    I have a request from a user, is it possible for the button to not trigger the print but only to define the print area

    best regards
    0
  4. Le Pingou Posted messages 12275 Registration date   Status Contributor Last intervention   1 477
     
    Hello,
    The best thing is to insert a printed yes or no choice into the procedure, and that way you have just one button.
    This should be achievable for you.

    --
    Regards.
    The Penguin
    0
  5. marc41000 Posted messages 58 Registration date   Status Member Last intervention  
     
    RE

    let go of the print button yes or no the simplest way as I am asked is to define the print area

    Regards
    0
  6. Le Pingou Posted messages 12275 Registration date   Status Contributor Last intervention   1 477
     
    Hello,
    Start by trying what I proposed to you and then you come back....!

    --
    Regards.
    The Penguin
    0
  7. marc41000 Posted messages 58 Registration date   Status Member Last intervention  
     
    Users prefer to print themselves

    Best regards
    0
  8. Le Pingou Posted messages 12275 Registration date   Status Contributor Last intervention   1 477
     
    Hello,
    Thank you, this is really nonsense...!
    I am leaving the position.

    --
    Regards.
    The Penguin
    0
  9. marc41000 Posted messages 58 Registration date   Status Member Last intervention  
     
    Why is it nonsense?
    0
Previous
  • 1
  • 2