changing pictures according to cell value

From: frsm <frsm.2aa5tz_1151780401.9201_at_excelforum-nospam.com>
Date: Sat, 1 Jul 2006 13:58:21 -0500

hi guys

I've a sheet with vba code and many pictures the code's function is to display the picture which i write its name in cell (A1) it works well
the problem that the code stop to work after adding number of pictures that makes me conclude that excel has limit number of picture or pictures size or there is aproblem
so i hope to find any one who can expaline this form me or solve the problem

Code:


    Option Explicit   

  Private Sub Worksheet_Calculate()
  Dim sora As Picture
  Me.Pictures.Visible = False
  With Range("d8")
  For Each sora In Me.Pictures
  If sora.Name = .Text Then

  sora.Visible = True 
  sora.Top = .Top 
  sora.Left = .Left 

  Exit For
  End If
  Next sora
  End With
  End Sub

i hope to know the reason of the error

-- 
frsm

------------------------------------------------------------------------
frsm's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=31231 View this thread: http://www.excelforum.com/showthread.php?threadid=557600
Received on Sat Jul 01 2006 - 11:58:21 PDT

Click to report inappropriate content