Picture in Cell of Active Sheet
Hi Sige,
Try:
'===================
Private Sub Workbook_SheetActivate(ByVal Sh As Object)
Dim pic As Picture
Dim WS As Worksheet
Set WS = Sheets("YOUR HIDDEN SHEET NAME")
If Sh.Name < WS.Name Then
On Error Resume Next
Sh.Pictures.Delete
On Error GoTo 0
Set pic = WS.Pictures("Picture 5")
With pic
.CopyPicture
Sh.Paste Destination:=Sh.Range("A1")
.Top = Range("A1").Top
.Left = Range("A1").Left
.Height = Range("A1").EntireRow.Height
.Width = Sh.Range("A1").EntireColumn.Width
End With
End If
End Sub
'<<===================
Paste this code into the Workbook's ThisWorkbook module, not into a standard
module,
---
Regards,
Norman
"Sige" wrote in message
oups.com...
Hi All,
I have a Picture (Picture 5 in Name Box) stored on a hidden sheet.
Is it possible to load this picture in Cell A1 on every active sheet.
Resizing it to the actual A1-Cell size of that active sheet?
Brgds Sige
|