I'm trying to create a dynamic print range from A2, to F2, and extending to the last line with text. I've tried this code, and just can't seem to get it.
Sub printFigure2()
Dim ws2 As Worksheet
Set ws2 = Worksheets("Figure 2-2")
With ws2
This was my first bridge to cross, but in the end, I actually want to insert a text box (with basically a signature line inside of it) 2 rows below the last row of text, and also have the text box incorporated in the dynamic print area. If you know how to help me with the print area, maybe you also know how to help me with the text box? Thanks in advance!
Sub printFigure2()
Dim ws2 As Worksheet
Set ws2 = Worksheets("Figure 2-2")
With ws2
.ResetAllPageBreaks
With .PageSetup
With .PageSetup
.PrintArea = "Offset('Figure 2-2'!$A$2,,,Count('Figure 2-2'!A2:A),)"
.PaperSize = xlPaperLetter
.Orientation = xlPortrait
.FitToPagesTall = False
.FitToPagesWide = 1
.CenterFooter = "Page &P of &N"
.PaperSize = xlPaperLetter
.Orientation = xlPortrait
.FitToPagesTall = False
.FitToPagesWide = 1
.CenterFooter = "Page &P of &N"
End With
.PrintPreview
.PrintPreview
End With
End Sub
This was my first bridge to cross, but in the end, I actually want to insert a text box (with basically a signature line inside of it) 2 rows below the last row of text, and also have the text box incorporated in the dynamic print area. If you know how to help me with the print area, maybe you also know how to help me with the text box? Thanks in advance!