Warme bakkertje
Meubilair
- Lid geworden
- 13 apr 2008
- Berichten
- 7.539
- Besturingssysteem
- Windows 10
- Office versie
- Office 2016 Prof Plus EN
Code:
Private Sub CommandButton1_Click()
On Error Resume Next
ActiveSheet.Shapes("ActiefPicture").Delete
Set sShape = ActiveSheet.Shapes.AddPicture(Application.GetOpenFilename("JPEG-Afbeelding (*.jpg), *.jpg"), _
msoFalse, msoCTrue, Cells(11, 2).Left + 22, Cells(11, 2).Top, 390, 260)
sShape.Name = "ActiefPicture"
End Sub
Private Sub CommandButton2_Click()
On Error Resume Next
ActiveSheet.Shapes("ActiefPicture2").Delete
Set sShape = ActiveSheet.Shapes.AddPicture(Application.GetOpenFilename("JPEG-Afbeelding (*.jpg), *.jpg"), _
msoFalse, msoCTrue, Cells(162, 2).Left + 22, Cells(162, 2).Top, 400, 345)
sShape.Name = "ActiefPicture2"
End Sub
Meer code is er niet nodig voor beide knoppen.
Laatst bewerkt: