Well, I have included the MACRO HIDE EMPTY ROWS long time back into a module. This macro on click hides empty rows from the given range of the active sheet.
Having this macro I thought I would modify it with the Sub ShowPrintDialog() macro so that when I press the print macro all the empty rows of from the given range of the sheet gets hidden and then the print dialog opens. So I raised the question on Post 12770.
And according to the answer I got from Stuart, I modified the two codes into one as follows.
Code: Select all
Sub PrintDialog()
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
Dim rw As Long
For rw = 26 To 35
Range("A" & rw).EntireRow.Hidden = (Range("A" & rw) = "")
Next rw
Application.Calculation = xlCalculationAutomatic
Application.Dialogs(xlDialogPrint).Show
Application.ScreenUpdating = True
End Sub
What I got confused later was the part of the answer in which, Stuart had said as
Alternatively, you could add the line
HideEmptyRows
Immediately after
Sub ShowPrintDialog()
By mentioning HideEmptyRows Stuart didn’t mention () part. That’s why I got confused.
But now I have figured out what Stuart has mentioned. It’s the () thing that had made the confusion.
Anyway thanks for the help. And I really appreciate that.