Results 1 to 6 of 6

Thread: Buttons to hide and show Visio Layers

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,446
    Location
    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
    Last edited by Aussiebear; 01-03-2025 at 04:52 PM.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •