bonjour dénérion,
pour cette exemple j'ai supposé que la page active est celle dont tu veut ajouter l'image du userform, il faut adapter la cellule ou sera mit l'image.
Private Declare Sub keybd_event Lib "user32" (ByVal bVk As Byte, ByVal bScan As Byte, ByVal dwFlags As Long, ByVal dwExtraInfo As Long)
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| Private Sub CommandButton1_Click()
Me.MultiPage1.Value = 4
Me.Repaint
keybd_event vbKeySnapshot, 1, 0&, 0&
DoEvents
With ActiveSheet
.Paste
p = .Shapes.Count
.Shapes(p).Top = .Range("B2").Top ' àdapter l'adresse de cellule
.Shapes(p).Left = .Range("B2").Left
.Shapes(p).Height = 200
.Shapes(p).Width = 300
End With
End Sub |
Partager