View Single Post
  #11   Report Post  
Posted to microsoft.public.excel,microsoft.public.excel.misc,microsoft.public.excel.newusers,microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions
Ken Johnson Ken Johnson is offline
external usenet poster
 
Posts: 1,073
Default Why messages fail to appear on MSNews server

I use Google Groups and tried 5 times to post a solution here...
http://groups.google.com.au/group/mi...71c861c59d83d9
The following solution (no "x y z"s w/o spaces) just kept on
disappearing after varying times...

Try not using Dim oPic As Picture, use Dim oPic As Shape instead.
It means an extra loop to hide Shapes that are Pictures without hiding
any other Shapes...

Private Sub Worksheet_Calculate()
Dim oPic As Shape
For Each oPic In Me.Shapes
If oPic.Type = msoPicture Then
oPic.Visible = False
End If
Next oPic
With Range("ad1")
For Each oPic In Me.Shapes
If oPic.Name = .Text Then
oPic.Visible = True
oPic.Top = .Top
oPic.Left = .Left
Exit For
End If
Next oPic
End With
End Sub

Ken Johnson


Ken Johnson