Bonjour ,
Je voulais remplir une feuille de calcul a partir d'un ListBox pour l'imprimer par la suite, l'errreur de compilation ci-dessous s'affiche
Le code :
Private Sub CommandButton4_Click()
'Invoice sheet
With Worksheets("Invoice")
.Cells(4, 7).Value = TextBox2.Value
.Cells(4, 1).Value = TextBox3.Value
End With
Dim A As Integer, x As Range
For A = 1 To Me.ListBox1.ListCount - 1
Set x = Sheets("Invoice").Range("A24").End(xlUp).Offset(1, 0)
x.Value = Me.ListBox1.List(A, b)
Next b
Next A
'For Pdf Save
Sheets("Invoice").Range("A1:H28").ExportAsFixedFormat xlTypePDF, _
Filename:="D:\"
Unload Me
Transaction.Show
Application.ScreenUpdating = True
End Sub
En piece jointe le fichier