Is it possible to Show and Hide images on a worksheet?
I have a worksheet where a user can insert a screenshot. I would like to give the option to show and hide that image or images in a range of cells.
The macro hides and shows the rows fine but the image remains. I would like for the image to also be hidden so it wont overlap other content.
I wont know the name of the image so cant always reference "Picture 1" or something similar in the code.
I have a worksheet where a user can insert a screenshot. I would like to give the option to show and hide that image or images in a range of cells.
The macro hides and shows the rows fine but the image remains. I would like for the image to also be hidden so it wont overlap other content.
I wont know the name of the image so cant always reference "Picture 1" or something similar in the code.
Code:
Sub show_hide()
If Range("screenshot").EntireRow.Hidden = True Then
Range("screenshot").EntireRow.Hidden = False
Else
Range("screenshot").EntireRow.Hidden = True
End If
End Sub