Try this, just call it with the target layer name
Public Sub HideThisLayer(ByRef LayerName As String) Dim pag As Visio.Page Dim lyr As Visio.Layer Dim aryLayer() As String Dim sLayer As String Dim iLayer As Integer Set pag = ActivePage For Each lyr In pag.Layers lyr.CellsC(Visio.visLayerVisible).Formula = UCase(lyr.Name) = UCase(LayerName) Next lyr End Sub