Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-03-2018, 06:28 PM
Guessed's Avatar
Guessed Guessed is offline show or hide layers in all pages Windows 10 show or hide layers in all pages Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,160
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

As a concept (ie I didn't test this because I don't know where you got your Checkboxes from) try these macros
Code:
Public Sub CheckBox1_Click()
  ShowHideLayer "To Be Form", CheckBox1.Value
End Sub

Public Sub CheckBox2_Click()
  ShowHideLayer "SHC As Is Form", CheckBox2.Value
End Sub

Public Sub CheckBox3_Click()
  ShowHideLayer "Works As Is Form", CheckBox3.Value
End Sub

Public Sub ShowHideLayer(sLayerName As String, bShow As Boolean)
  Dim aPage As Visio.Page, aLayer As Visio.Layer, aCell As Visio.Cell
  
  For Each aPage In ActiveDocument.Pages
    For Each aLayer In aPage.Layers
      If aLayer.Name = sLayerName Then
        Set aCell = aLayer.CellsC(visLayerVisible)
        aCell.Formula = bShow
      End If
    Next aLayer
  Next aPage
End Sub

__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with show/hide content control acontreras Word VBA 0 10-21-2014 07:28 PM
show or hide layers in all pages Tab symbols display with Show/Hide off Lowenburg Word 3 02-01-2012 03:57 PM
show or hide layers in all pages Show Hide info trintukaz Word 3 12-29-2011 12:23 AM
show or hide layers in all pages VBA to show/hide tables ccordner Word VBA 2 07-04-2011 03:00 AM
VBA to show/hide tables ccordner Outlook 0 07-01-2011 05:10 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:03 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft