XL 2016 rapport mensuel de maintenance

guy soki

XLDnaute Nouveau
Bonjour le forum

pouvez-vous m'aidé à rendre opérationnelle mon fichier
en effet je viens de modifier un de me rapport journalier pour qu'il me sert d'un rapport mensuel
après avoir supprimé quelques colonnes pour modification le fichier ne fonctionne plus bien
Deuxième aide vous pouvez aussi inséré l'option inséré image. ca me permettre d'insérer les photos sur mon rapport
 

Pièces jointes

  • Fichier ELECTRICITE.xlsm
    837.2 KB · Affichages: 30

sylvanu

XLDnaute Barbatruc
Supporter XLD
Bonjour Guy Soki,
Votre code fait appel à des textbox qui n'existent pas dans votre userform, par exemple :
VB:
Cells(derligne, 1) = TextBox1.Value     ' ok
Cells(derligne, 2) = TextBox2.Value     ' ok
Cells(derligne, 3) = TextBox3.Value     ' ok
Cells(derligne, 4) = TextBox5.Value     ' ok
Cells(derligne, 5) = TextBox6.Value     ' ok
Cells(derligne, 6) = TextBox7.Value     ' ok
Cells(derligne, 7) = TextBox8.Value     ' n'existe pas
Cells(derligne, 8) = TextBox9.Value     ' n'existe pas
Cells(derligne, 9) = TextBox10.Value     ' n'existe pas
Cells(derligne, 10) = TextBox11.Value     ' ok
Cells(derligne, 11) = TextBox12.Value     ' ok
Cells(derligne, 12) = TextBox13.Value     ' ok
Cells(derligne, 13) = TextBox14.Value     ' n'existe pas
Cells(derligne, 14) = TextBox15.Value     ' n'existe pas
Cells(derligne, 15) = TextBox16.Value     ' n'existe pas
Cells(derligne, 16) = TextBox17.Value     ' n'existe pas
Cells(derligne, 17) = TextBox19.Value     ' n'existe pas
Cells(derligne, 18) = TextBox20.Value     ' n'existe pas
Cells(derligne, 19) = TextBox21.Value     ' n'existe pas
Cells(derligne, 20) = TextBox23.Value     ' ok
 

sylvanu

XLDnaute Barbatruc
Supporter XLD
Un essai en PJ avec :
VB:
Private Sub CommandButton5_Click()
    If Application.Dialogs(xlDialogInsertPicture).Show Then
        'Définit l'emplacement de l'image
        Set CheminImage = ActiveSheet.DrawingObjects(ActiveSheet.Shapes.Count)
        Label = "Image en attente"
    End If
End Sub
Private Sub InsertionImage()
    Dim Emplacement As Range
    Label = ""
    On Error GoTo FinImage
    'Définit l'emplacement de l'image
    Set Emplacement = Range("K" & Sheets("ELECTRICITE").Range("A456541").End(xlUp).Row + 1)
    Set Img = CheminImage
    With Img.ShapeRange
        .LockAspectRatio = msoFalse
        .Left = Emplacement.Left
        .Top = Emplacement.Top
        .Height = Emplacement.Height
        .Width = Emplacement.Width
    End With
FinImage:
End Sub

Directement inspiré de : Lien
 

Pièces jointes

  • Fichier ELECTRICITE2.xlsm
    734.1 KB · Affichages: 37

Discussions similaires

Statistiques des forums

Discussions
312 088
Messages
2 085 199
Membres
102 816
dernier inscrit
bolivier