How do I filter out empty rows before printing

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
 
S

Steve Schapel

Mr Gary,

The focus of this newsgroup is macros in Microsoft Access, the database
development tool. Macros in Access and macros in Excel are totally
different creatures. You are more likely to get good help in an Excel
newsgroup.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top