G
Guest
Hopefully someone can help me modify an existing macro in Excel XP.
My current macro is set-up to print-out a range of cells from a
hidden/protected worksheet that reflects information from a larger/detailed
worksheet. For example, each row shown on the detailed worksheet corresponds
to specific category. Depending on the User's information, several of these
categories (rows) are not applicable and are left blank. Is it possible to
incorporate an additional step into my existing macro that will omit
unpopulated/blank rows before printing?
My current macro reads as follows:
Sub MacroVP1()
'
' MacroVP1 Macro
'
Application.EnableCancelKey = x1Disabled
Application.ScreenUpdating = False
ActiveWorkbook.Unprotect Password:="lindAP"
Sheets("WKLY-RPT").Visible = True
Sheets("WKLY-RPT").Unprotect Password:="lindAP"
Sheets("WKLY-RPT").Select
ActiveWindow.LargeScroll ToRight:=3
Range("A1:K59").Select
Range("A1").Activate
ActiveSheet.PageSetup.PrintArea = "$A$1:$K$59,$BD$1:$BM$59"
ActiveWindow.SelectedSheets.PrintPreview
Sheets("WKLY-RPT").Visible = False
ActiveWorkbook.Protect Structure:=True, Windows:=False, Password:="lindAP"
Sheets("EXP RPT").Visible = True
Sheets("EXP RPT").Select
Range("K10").Select
Application.ScreenUpdating = False
Application.EnableCancelKey = x1Interrupt '
'
End Sub
My current macro is set-up to print-out a range of cells from a
hidden/protected worksheet that reflects information from a larger/detailed
worksheet. For example, each row shown on the detailed worksheet corresponds
to specific category. Depending on the User's information, several of these
categories (rows) are not applicable and are left blank. Is it possible to
incorporate an additional step into my existing macro that will omit
unpopulated/blank rows before printing?
My current macro reads as follows:
Sub MacroVP1()
'
' MacroVP1 Macro
'
Application.EnableCancelKey = x1Disabled
Application.ScreenUpdating = False
ActiveWorkbook.Unprotect Password:="lindAP"
Sheets("WKLY-RPT").Visible = True
Sheets("WKLY-RPT").Unprotect Password:="lindAP"
Sheets("WKLY-RPT").Select
ActiveWindow.LargeScroll ToRight:=3
Range("A1:K59").Select
Range("A1").Activate
ActiveSheet.PageSetup.PrintArea = "$A$1:$K$59,$BD$1:$BM$59"
ActiveWindow.SelectedSheets.PrintPreview
Sheets("WKLY-RPT").Visible = False
ActiveWorkbook.Protect Structure:=True, Windows:=False, Password:="lindAP"
Sheets("EXP RPT").Visible = True
Sheets("EXP RPT").Select
Range("K10").Select
Application.ScreenUpdating = False
Application.EnableCancelKey = x1Interrupt '
'
End Sub