VBA: HideZeroRows

Created by Damien Zwillinger, Modified on Thu, 05 Oct 2023 at 05:56 PM by Gabriel Michaud

Applies to:

  • Velixo Classic
  • Velixo NX (when used with Excel on Desktop)

Important: Visual Basic for Applications macros are not supported by Excel Online.


Hide rows that only have zero values for the provided range.


See Introduction to Velixo's VBA functions for general usage information.



  objVelixo.HideZeroRows [Range]

objVelixo A variable that represents an instance of the Velixo VBA functions class.






Required. Excel.Range to act upon.


The HideZeroRows method honors Excel's Application.DisplayAlerts flag.


If set to True, HideZeroRows behaves the same as when used from the toolbar (i.e. information, warning and errors will be displayed in message boxes).


If set to False, all information messages will be suppressed and all warning and error messages will instead be returned as exceptions.


To reapply HideZeroRows after data has changed see UnhideAll.



Apply HideZeroRows to a predefined range, without affecting current selection. In this case, we apply HideZeroRows to Debit and Credit columns of the Trial Balance sheet. This hides account rows without activity for the given financial period.


The below example uses the sample report from our Sample file.


Dim velixoObj As Velixo_Reports.VBA
Set velixoObj = CreateObject("Velixo.Reports.Vba")

velixoObj.HideZeroRows Range("'Trial Balance'!D8:E150")

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article