VBA: HideZeroColumns
Created by Damien Zwillinger, Modified on Thu, 5 Oct, 2023 at 5:51 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.
Purpose
Hide columns that only have zero values for the provided range.
See Introduction to Velixo's VBA functions for general usage information.
Syntax
objVelixo.HideZeroColumns [Range]
objVelixo - a variable that represents an instance of the Velixo VBA functions class.
Parameters
Name | Description |
Range | Required. Excel.Range to act upon. |
Remarks
The HideZeroColumns method honors Excel's Application.DisplayAlerts flag.
If set to True, HideZeroColumns 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 HideZeroColumns after data has changed see UnhideAll.
Example
Apply HideZeroColumns to a predefined range (rows 6 to 12 of sheet Sheet Name), without affecting current selection.
Dim velixoObj As Velixo_Reports.VBA Set velixoObj = CreateObject("Velixo.Reports.Vba") velixoObj.HideZeroColumns Range("'Sheet Name'!6:12")
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article