LOGO

  • Thread starter Thread starter Fernando Duran
  • Start date Start date
F

Fernando Duran

I have a worksheet, thta I need to put a logo, but it's not always the
same logo, need to be change it (5 or 6 logos). Do we have a way to do
that?
Thanks
Fernando
 
Fernando,

Here's some code I came up with some time ago that works by having the logos
listed in a data validation list and selecting from
there moves it to the show area.

Selected refere to the DV cell, StorageCell is where the logos are
stored )off-view), and DisplayCell is where the logo is shown.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim sh As Shape
Application.EnableEvents = False
On Error GoTo ws_exit
If Not Intersect(Target, Range("Selected")) Is Nothing Then
With Target
If .Value <> "" Then
For Each sh In ActiveSheet.Shapes
sh.Left = Range("StorageCell").Left + 2
sh.Top = Range("StorageCell").Top + 2
Next sh
With ActiveSheet.Shapes(.Value)
.Left = Range("DisplayCell").Left + 2
.Top = Range("DisplayCell").Top + 2
End With
End If
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Well, I read your macro, is ok. just one part, may be stupid and a
simple answer... How you storage the pictures in one cell?
Stupid question, but I don't know the answer

Thanks

Fernando
 
Fernando,

You aren't actually storing the pictures in the cell, they are just being
stored at a position that aligns to that cell. And each picture is simply
overlaid on the others. In the same way, the picture being displayed isn't
actually in a cell, it is aligned to that cell in the same way.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Back
Top