• Visio and VBA module

    Author
    Topic
    #463912

    Where in Visio would I include the VBA module below?

    Sub ColourMe()
    Dim aShp As Visio.Shape
    For Each aShp In ActivePage.Shapes
    If aShp.CellExists(“Prop.Department”, True) Then
    Select Case aShp.Cells(“Prop.Department”).FormulaU
    Case “””East”””
    aShp.FillStyle = “East”
    Case “””West”””
    aShp.FillStyle = “West”
    Case Else
    aShp.FillStyle = “Other”
    End Select
    End If
    Next aShp
    End Sub

    Viewing 0 reply threads
    Author
    Replies
    • #1185711

      Type Alt-F11 to open the Visual Basic Environment
      Insert > Module
      Copy the code and paste it into the pane on the right

    Viewing 0 reply threads
    Reply To: Visio and VBA module

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: