PORCHER
XLDnaute Occasionnel
Bonjour à tous,
J'aurais besoin de vos lumières car je sèche !
J'ai dans cette macro une Erreur de compilation
Nombre d'arguments incorrect ou affectation de propriété incorrect avec la formule Dir
Voici la macros
Pourriez-vous m'aider
Merci infiniment pour votre gentillesse
Cordialement
J'aurais besoin de vos lumières car je sèche !
J'ai dans cette macro une Erreur de compilation
Nombre d'arguments incorrect ou affectation de propriété incorrect avec la formule Dir
Voici la macros
VB:
Private Sub Txt_photo_equipement_AfterUpdate()
Dim Chemin, NomFichier As String
Dim W As Single, h As Single
On Error GoTo Erreur
'chemin = ThisWorkbook.Path & "\Images\"
Chemin = "C:\Users\jyves\OneDrive\Documents\Inventaires\PhotoPieces\"
NomFichier = Txt_photo_equipement.Value
If Dir(Chemin & NomFichier & ".jpg") = "" Then
PhotoPieces.Picture = LoadPicture(Chemin & "inexistante.jpg")
Else
PhotoPieces.Picture = LoadPicture(Chemin & choix & ".jpg")
PhotoPieces.PictureSizeMode = fmPictureSizeModeZoom
PhotoPieces.Object.BorderColor = RGB(179, 209, 202) 'rouge
PhotoPieces.Object.BackColor = RGB(179, 209, 202) 'vert
W = PhotoPieces.Width
h = PhotoPieces.Height
With UF_Pièces.PhotoPieces
.Picture = PhotoPieces
.Width = W / h * 234
.Left = 228 - (.Width / 2)
End With
End If
Erreur:
End Sub
Merci infiniment pour votre gentillesse
Cordialement