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

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Nvm!
.Selected needed to be removed.

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

Forum statistics

Threads
1,214,945
Messages
6,122,395
Members
449,081
Latest member
JAMES KECULAH

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