VBA: UnhideAll
Gabriel Michaud avatar
Written by Gabriel Michaud
Updated over a week ago

Purpose

Shows all rows and columns that are hidden.

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

Syntax

objVelixo.UnhideAll

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

Remarks

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

If set to True, UnhideAll behaves just like 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.

UnhideAll is especially useful when used together with HideZeroRows or HideZeroColumns. See example for more detail.

Example

Simple usage

Using UnhideAll stand-alone:

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

velixoObj.UnhideAll

Common usage

A common use case is to UnhideAll, update some data and (re)apply HideZeroRows and/or Columns to one or many predefined ranges.

The below example uses the sample report structure from P&L, Trial Balance, Cash Flow, Project Profitability:

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

velixoObj.UnhideAll

' Update Financial Period
Range("'Trial Balance'!B3").Value = "10-2018"

velixoObj.HideZeroRows Range("'Trial Balance'!D8:E150")
Did this answer your question?