I hid a shape (VBA) and now cant unhide it...

Metaripley

Board Regular
Joined
Dec 31, 2014
Messages
93
When I use the "False" statement it makes it invisible.
But when I change it to "True", It will not make it visible.


VBA Code:
Sub Show_button()

If Range("Custom_dimensions") = "No" And _
    ( _
    IsEmpty(Range("Type_vent")) = True Or _
    IsEmpty(Range("Inch_mm")) = True Or _
    IsEmpty(Range("Entry_With")) = True Or _
    IsEmpty(Range("Entry_length")) = True Or _
    Range("Entry_length") < Range("Entry_With") = True) Then
    
    ActiveSheet.Shapes.Range(Array("Rounded Rectangle 43")).Select 'Criteria ' This is the rule that hides the shape.
    Selection.ShapeRange.Visible = False                                                             
        
    Else
    
    If Range("Custom_dimensions") = "Yes" And _
        ( _
        IsEmpty(Range("Type_vent")) = True Or _
        IsEmpty(Range("Inch_mm")) = True Or _
        IsEmpty(Range("Entry_With")) = True Or _
        IsEmpty(Range("Entry_length")) = True Or _
        IsEmpty(Range("Custom_dimensions")) = True Or _
        IsEmpty(Range("Frame_custom")) = True Or _
        IsEmpty(Range("Bolts_custom")) = True Or _
        IsEmpty(Range("Entry_spacing_edge")) = True Or _
        IsEmpty(Range("Entry_Holes_Spaced_Length")) = True Or _
        IsEmpty(Range("Entry_Holes_Spaced_Width")) = True Or _
        Range("Entry_length") < Range("Entry_With") = True) Then

        ActiveSheet.Shapes.Range(Array("Rounded Rectangle 41")).Select 'Criteria
        Selection.ShapeRange.ZOrder msoBringToFront
        Else
            If IsNumeric(Range("Dwg_Nr")) Then
                ActiveSheet.Shapes.Range(Array("Rounded Rectangle 42")).Select 'Existing
                Selection.ShapeRange.ZOrder msoBringToFront
                Else
                ActiveSheet.Shapes.Range(Array("Rounded Rectangle 24")).Select 'Make drawing
                Selection.ShapeRange.ZOrder msoBringToFront
            End If
    End If
End If
      
End Sub
 

Excel Facts

Excel motto
Not everything I do at work revolves around Excel. Only the fun parts.
Nvm!
.Selected needed to be removed.

VBA Code:
ActiveSheet.Shapes.Range(Array("Rounded Rectangle 41")).Visible = True
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top