Hello everyone,
I'd like to ask for your help regarding a project on Excel.
What it does:
If Cell value in "C36" or "D36" is Yes, then a picture will be displayed (either Picture 1 or Picture 2).
If Cell value is No, then the pictures won't be displayed.
The code I use:
Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("C36")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
With Range("D36")
For Each oPic In Me.Pictures
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub
My problem:
By default, all pictures on the Excel sheet are invisible.
My problem is, there are 3 pictures I'd like to display at all time because they are part of the document's decoration.
Therefore, I'd like to add an exception for the Picture A, Picture B, Picture C so they are not affected by the command "Me.Pictures.Visible = False".
Please may I ask if someone could help me and advise which code I should use?
Please let me know if you need more information.
Thank you very much in advance.
NOTE:
Since the forum's rules require me to provide a link in case I asked the same question on a different forum, here it is. That was before I could find this forum.
Bookmarks