Skip to main content
Skip table of contents

VBA: HideZeroRows

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

Purpose

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

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

Syntax

CODE
objVelixo.HideZeroRows [Range]


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

Arguments

Name

Description

Range

Required. Excel.Range to act upon.

Remarks

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.

Example

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.

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

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

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.