Hi Everyone,
First of all , thank you for the one who shared this code I got from the internet site.
I am using this code to insert, hide and display pics on a worksheet. But now I have problem on inserting more pictures...pictures can be inserted but not hiding when not needed. I want to diplay picture one at a time, as picture name is called on a cell and the rest of the pictures should be hidden. Here is the ode I got from internet. Is this code limited to certain number of pics only, how can i increase to more than hundred pictures.
Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("I4")
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
By the way I am using Excel 2003. Thanks.
First of all , thank you for the one who shared this code I got from the internet site.
I am using this code to insert, hide and display pics on a worksheet. But now I have problem on inserting more pictures...pictures can be inserted but not hiding when not needed. I want to diplay picture one at a time, as picture name is called on a cell and the rest of the pictures should be hidden. Here is the ode I got from internet. Is this code limited to certain number of pics only, how can i increase to more than hundred pictures.
Private Sub Worksheet_Calculate()
Dim oPic As Picture
Me.Pictures.Visible = False
With Range("I4")
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
By the way I am using Excel 2003. Thanks.
Last edited: