Dstuurland
Nieuwe gebruiker
- Lid geworden
- 25 feb 2013
- Berichten
- 4
kan iemand mij helpen met het invoegen van een foto op een ander werksheet, ook in de juist proportie van de cell dat hij mee kan expanden en krimpen.
dit is wat ik tot nu toe heb
Private Sub Image_Click()
Dim ImgFileFormat As String, pic As Variant
On Error Resume Next
ImgFileFormat = "Image Files jpg (*.jpg),*.jpg,(*.bmp),others, tif (*.tif),*.tif"
Set pic = ActiveSheet.Pictures.Insert(Application.GetOpenFilename(ImgFileFormat))
On Error GoTo 0
If Not pic Is Nothing Then
Set Rng = ActiveCell
With pic
.Height = Rng.Height
.Width = Rng.Width
.Left = Rng.Left
.Top = Rng.Top
.Placement = xlMoveAndSize
End With
End If
Application.Goto (ActiveWorkbook.Sheets("Blad2").Range("A7"))
End Sub
dit is wat ik tot nu toe heb
Private Sub Image_Click()
Dim ImgFileFormat As String, pic As Variant
On Error Resume Next
ImgFileFormat = "Image Files jpg (*.jpg),*.jpg,(*.bmp),others, tif (*.tif),*.tif"
Set pic = ActiveSheet.Pictures.Insert(Application.GetOpenFilename(ImgFileFormat))
On Error GoTo 0
If Not pic Is Nothing Then
Set Rng = ActiveCell
With pic
.Height = Rng.Height
.Width = Rng.Width
.Left = Rng.Left
.Top = Rng.Top
.Placement = xlMoveAndSize
End With
End If
Application.Goto (ActiveWorkbook.Sheets("Blad2").Range("A7"))
End Sub