HugeJuicyLemmons
New Member
- Joined
- Apr 9, 2019
- Messages
- 2
Hello,
i am working on a sheet the generates a report in a friendly format and prints it
the way this works is by having a unhidden area that the user generates information for
some of this information is copied over to a hidden area which is the area that is printed when running the macro (range k is the report area)
this macro hides the input area unhides the report area, prints, and then rehides the print area and unhides the input area
i am trying to add a way to skip empty rows before my report prints (perhaps hiding them before print and unhiding them after print)
Sub Print_Active_Sheet()
Dim active As Worksheet
Set active = ActiveSheet
ActiveSheet.Unprotect
Columns("A:J").Select
Selection.EntireColumn.Hidden = True
Columns("K:P").Select
Selection.EntireColumn.Hidden = False
ActiveSheet.PrintOut
Selection.EntireColumn.Hidden = True
Columns("A:J").Select
Selection.EntireColumn.Hidden = False
Range("A5").Select
ActiveSheet.Protect DrawingObjects:=True, contents:=True, Scenarios:=True
End Sub
any help would be appreciated!
thnaks
i am working on a sheet the generates a report in a friendly format and prints it
the way this works is by having a unhidden area that the user generates information for
some of this information is copied over to a hidden area which is the area that is printed when running the macro (range k is the report area)
this macro hides the input area unhides the report area, prints, and then rehides the print area and unhides the input area
i am trying to add a way to skip empty rows before my report prints (perhaps hiding them before print and unhiding them after print)
Sub Print_Active_Sheet()
Dim active As Worksheet
Set active = ActiveSheet
ActiveSheet.Unprotect
Columns("A:J").Select
Selection.EntireColumn.Hidden = True
Columns("K:P").Select
Selection.EntireColumn.Hidden = False
ActiveSheet.PrintOut
Selection.EntireColumn.Hidden = True
Columns("A:J").Select
Selection.EntireColumn.Hidden = False
Range("A5").Select
ActiveSheet.Protect DrawingObjects:=True, contents:=True, Scenarios:=True
End Sub
any help would be appreciated!
thnaks