none
select all connectors RRS feed

  • Question

  • Hi,

     ActiveSheet.connectors.Select does not select all connectors while  ActiveSheet.ovals.Select does . Similarly  ActiveSheet.Rectangels.Select does not . Please help.

    regards


    Sunday, March 13, 2016 4:57 PM

Answers

  • Hi, drsantoshsinghrathore

    Following code will help you.

    To Select All Rectangle in a Sheet.

    Sub SelectAllRectangles()
        Dim shpTemp As Shape
        Dim blnReplace As Boolean 
        blnReplace = True
        For Each shpTemp In ActiveSheet.Shapes
            If shpTemp.Type = msoAutoShape Then
                If shpTemp.AutoShapeType = msoShapeRectangle Then
                    Debug.Print shpTemp.Name
                    shpTemp.Select blnReplace
                    blnReplace = False
                End If
            End If
        Next
    End Sub

    Code to Select All Connectors in Sheet.

    Sub SelectAllConnectors()    
        Dim shpTemp As Shape
        Dim blnReplace As Boolean    
        blnReplace = True
        For Each shpTemp In ActiveSheet.Shapes
            If shpTemp.Type = msoAutoShape Then
                If shpTemp.AutoShapeType = msoConnectorTypeMixed Then
                    Debug.Print shpTemp.Name
                    shpTemp.Select blnReplace
                    blnReplace = False
                End If
            End If
        Next     
    End Sub

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Monday, March 14, 2016 5:57 AM
    Moderator

All replies

  • Hi, drsantoshsinghrathore

    Following code will help you.

    To Select All Rectangle in a Sheet.

    Sub SelectAllRectangles()
        Dim shpTemp As Shape
        Dim blnReplace As Boolean 
        blnReplace = True
        For Each shpTemp In ActiveSheet.Shapes
            If shpTemp.Type = msoAutoShape Then
                If shpTemp.AutoShapeType = msoShapeRectangle Then
                    Debug.Print shpTemp.Name
                    shpTemp.Select blnReplace
                    blnReplace = False
                End If
            End If
        Next
    End Sub

    Code to Select All Connectors in Sheet.

    Sub SelectAllConnectors()    
        Dim shpTemp As Shape
        Dim blnReplace As Boolean    
        blnReplace = True
        For Each shpTemp In ActiveSheet.Shapes
            If shpTemp.Type = msoAutoShape Then
                If shpTemp.AutoShapeType = msoConnectorTypeMixed Then
                    Debug.Print shpTemp.Name
                    shpTemp.Select blnReplace
                    blnReplace = False
                End If
            End If
        Next     
    End Sub

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Monday, March 14, 2016 5:57 AM
    Moderator
  • Hi drsantoshsinghrathore,

    With me,

    1. I don't see Connectors property available for ActiveSheet,
    2. ActiveSheet.Ovals.Select and ActiveSheet.Rectangles.Select are all working as expected.

    I'm using Office 2016.

    Which office version are you using?

    Monday, March 14, 2016 7:52 AM
  • Hi Jackie,

    Thanks.

    ActiveSheet.Rectangles.Select is working. It was some other mistake.

    ActiveSheet.connectors.Select,

    Not working.

    regards







    Tuesday, March 15, 2016 1:00 AM
  • Hi, drsantoshsinghrathore

    I have searched about ActiveSheet.connectors.Select but I did not find any useful information regarding that. It looks like it is not supported. That’s why as a workaround to solve your issue I have provided you a VBA code that is able to select all connectors.

    Regards

    Deepak


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

    Tuesday, March 15, 2016 7:15 AM
    Moderator
  • Thanks Deepak Panchal ,

    regards

    Tuesday, March 15, 2016 2:22 PM