Hi all,
Long story: I have got a macro which prints top level detail summary and with the summary of each project. At the moment the Macro is static and only goes down to row 98. However if I add in a project which will be one line for summary and say about 8 detail lines (which are grouped and hidden under the macro) it will go down to line 107 etc. and wont print that new line.
Short Story: How can I change the following macro so it picks the last blank row and not just a specific line.
This will be for non VB users so dont want them to have to change code all the time.
Thanks for the help guys, this board is a life saver!
Long story: I have got a macro which prints top level detail summary and with the summary of each project. At the moment the Macro is static and only goes down to row 98. However if I add in a project which will be one line for summary and say about 8 detail lines (which are grouped and hidden under the macro) it will go down to line 107 etc. and wont print that new line.
Short Story: How can I change the following macro so it picks the last blank row and not just a specific line.
Code:
Sub Print_initative()
ActiveSheet.Outline.ShowLevels RowLevels:=1
ActiveSheet.PageSetup.PrintArea = "$B$3:$AI$93"
With ActiveSheet.PageSetup
Orientation = xlLandscape
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 2
.PrintGridlines = False
.LeftMargin = Application.InchesToPoints(0.1)
.RightMargin = Application.InchesToPoints(0.1)
.TopMargin = Application.InchesToPoints(0.1)
.BottomMargin = Application.InchesToPoints(0.1)
.CenterHorizontally = True
End With
Application.Dialogs(xlDialogPrint).Show
This will be for non VB users so dont want them to have to change code all the time.
Thanks for the help guys, this board is a life saver!