Set L1 = BarForm.Controls.Add("forms.label.1", "Label1", True)
C'est une erreur par rapport à l'objet.
Bonjour Frédéric,
Je n'ai pas testé ton code... mais tu dois avoir un problème là :
q = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value -
Worksheets("STOCKprod").Range("A3:D" &
Range("A1000").End(xlUp).Row).Find(p).Offset(0, 3).Value
ça devrait plutôt ressembler à ceci :
s = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value
with Worksheets("STOCKprod")
With .Range("A3:D" & .Range("A1000").End(xlUp).Row).
r= .Find(p).Offset(0, 3).Value
End with
End with
Q = S - R
Il doit y avoir un point devant chaque "Range" pour siginifier quelle est la
feuille source de la plage.
..Range("A3:D" & .Range("A1000").End(xlUp).Row).
P.S. La méthode Find ... si tu n'utilises pas certains PARAMÈTRES va finir par te causer
des problèmes... prend le temps de lire dans l'aide toute l'information sur
cette méthode...
C'est spécial .... car la méthode recherche dans A3:Dx et peu importe où elle
trouve l'information (colonne) , tu extraits toujours la valeur 3 colonnes à droite !!!! ?
Salutations!
"Frederic" a écrit dans le message de news:
Bonjour à tous, j'ai a nouveau besoin d'aide!
Je crée de maniére dynamique un form représentant un Ordre de Fab. Celui ci
est donc toujours le meme, sauf son nom et intitulé qui change.Ensuite , je
crée par code les labels et textbox de ce form.
Mon proble est que le nom du form est lié à une variable et le code me
retourne une erreur a cause du nom.
Voici mon code: Si quelqu'un pouvait m'aider.
Merci
Dim BarForm As Object, p As Variant, q As Integer, N As Variant
Dim L1 As MSForms.Label, L2 As MSForms.Label, L3 As MSForms.Label
Dim T1 As MSForms.textbox, T2 As MSForms.textbox, T3 As MSForms.textbox
Function CreationOF()
Dim q As Integer, p As Variant
p = Worksheets("CommandeCLIENT").Range("C1000").End(xlUp).Value
q = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value -
Worksheets("STOCKprod").Range("A3:D" &
Range("A1000").End(xlUp).Row).Find(p).Offset(0, 3).Value
N = Worksheets("CommandeCLIENT").Range("A1000").End(xlUp).Value
'userform
Set BarForm = ThisWorkbook.VBProject.VBComponents.Add(3)
With BarForm
.Properties("Caption") = " OF " & N
.Properties("Width") = 130
.Properties("Height") = 150
End With
'label sur userform
Set L1 = BarForm.Controls.Add("forms.label.1", "Label1", True)
With L1
.Text = "Produit"
.Left = 5
.Top = 5
.Width = 120
.Height = 18
.Name = "Label1"
.Font.Bold = True
.Font.Size = 10
End With
Set L2 = BarForm.Controls.Add("forms.label.1", "Label2", True)
With L2
.Text = "Quantité"
.Left = 1
.Top = 50
.Width = 50
.Height = 18
.Name = "Label2"
.Font.Bold = True
.Font.Size = 10
End With
Set L3 = BarForm.Controls.Add("forms.label.1", "Label3", True)
With L3
.Text = "Délai"
.Left = 1
.Top = 70
.Width = 50
.Height = 18
.Name = "Label3"
.Font.Bold = True
.Font.Size = 10
End With
'textbox sur userform
Set T1 = BarForm.Controls.Add("forms.textbox.1", "textbox1", True)
With T1
.Text = p
.Left = 5
.Top = 25
.Width = 120
.Height = 18
.Name = "textbox1"
.Font.Bold = True
.Font.Size = 10
End With
Set T2 = BarForm.Controls.Add("forms.textbox.1", "textbox2", True)
With T2
.Text = q
.Left = 55
.Top = 50
.Width = 44
.Height = 18
.Name = "textbox2"
.Font.Bold = True
.Font.Size = 10
End With
Set T3 = BarForm.Controls.Add("forms.textbox.1", "textbox3", True)
With T3
.Text > Worksheets("CommandeCLIENT").Range("E1000").End(xlUp).Value
.Left = 55
.Top = 70
.Width = 44
.Height = 18
.Name = "textbox3"
.Font.Bold = True
.Font.Size = 10
End With
End Function
Set L1 = BarForm.Controls.Add("forms.label.1", "Label1", True)
C'est une erreur par rapport à l'objet.
Bonjour Frédéric,
Je n'ai pas testé ton code... mais tu dois avoir un problème là :
q = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value -
Worksheets("STOCKprod").Range("A3:D" &
Range("A1000").End(xlUp).Row).Find(p).Offset(0, 3).Value
ça devrait plutôt ressembler à ceci :
s = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value
with Worksheets("STOCKprod")
With .Range("A3:D" & .Range("A1000").End(xlUp).Row).
r= .Find(p).Offset(0, 3).Value
End with
End with
Q = S - R
Il doit y avoir un point devant chaque "Range" pour siginifier quelle est la
feuille source de la plage.
..Range("A3:D" & .Range("A1000").End(xlUp).Row).
P.S. La méthode Find ... si tu n'utilises pas certains PARAMÈTRES va finir par te causer
des problèmes... prend le temps de lire dans l'aide toute l'information sur
cette méthode...
C'est spécial .... car la méthode recherche dans A3:Dx et peu importe où elle
trouve l'information (colonne) , tu extraits toujours la valeur 3 colonnes à droite !!!! ?
Salutations!
"Frederic" <Frederic@discussions.microsoft.com> a écrit dans le message de news:
5ED8F365-F45A-44D6-AA0E-6745CC019194@microsoft.com...
Bonjour à tous, j'ai a nouveau besoin d'aide!
Je crée de maniére dynamique un form représentant un Ordre de Fab. Celui ci
est donc toujours le meme, sauf son nom et intitulé qui change.Ensuite , je
crée par code les labels et textbox de ce form.
Mon proble est que le nom du form est lié à une variable et le code me
retourne une erreur a cause du nom.
Voici mon code: Si quelqu'un pouvait m'aider.
Merci
Dim BarForm As Object, p As Variant, q As Integer, N As Variant
Dim L1 As MSForms.Label, L2 As MSForms.Label, L3 As MSForms.Label
Dim T1 As MSForms.textbox, T2 As MSForms.textbox, T3 As MSForms.textbox
Function CreationOF()
Dim q As Integer, p As Variant
p = Worksheets("CommandeCLIENT").Range("C1000").End(xlUp).Value
q = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value -
Worksheets("STOCKprod").Range("A3:D" &
Range("A1000").End(xlUp).Row).Find(p).Offset(0, 3).Value
N = Worksheets("CommandeCLIENT").Range("A1000").End(xlUp).Value
'userform
Set BarForm = ThisWorkbook.VBProject.VBComponents.Add(3)
With BarForm
.Properties("Caption") = " OF " & N
.Properties("Width") = 130
.Properties("Height") = 150
End With
'label sur userform
Set L1 = BarForm.Controls.Add("forms.label.1", "Label1", True)
With L1
.Text = "Produit"
.Left = 5
.Top = 5
.Width = 120
.Height = 18
.Name = "Label1"
.Font.Bold = True
.Font.Size = 10
End With
Set L2 = BarForm.Controls.Add("forms.label.1", "Label2", True)
With L2
.Text = "Quantité"
.Left = 1
.Top = 50
.Width = 50
.Height = 18
.Name = "Label2"
.Font.Bold = True
.Font.Size = 10
End With
Set L3 = BarForm.Controls.Add("forms.label.1", "Label3", True)
With L3
.Text = "Délai"
.Left = 1
.Top = 70
.Width = 50
.Height = 18
.Name = "Label3"
.Font.Bold = True
.Font.Size = 10
End With
'textbox sur userform
Set T1 = BarForm.Controls.Add("forms.textbox.1", "textbox1", True)
With T1
.Text = p
.Left = 5
.Top = 25
.Width = 120
.Height = 18
.Name = "textbox1"
.Font.Bold = True
.Font.Size = 10
End With
Set T2 = BarForm.Controls.Add("forms.textbox.1", "textbox2", True)
With T2
.Text = q
.Left = 55
.Top = 50
.Width = 44
.Height = 18
.Name = "textbox2"
.Font.Bold = True
.Font.Size = 10
End With
Set T3 = BarForm.Controls.Add("forms.textbox.1", "textbox3", True)
With T3
.Text > Worksheets("CommandeCLIENT").Range("E1000").End(xlUp).Value
.Left = 55
.Top = 70
.Width = 44
.Height = 18
.Name = "textbox3"
.Font.Bold = True
.Font.Size = 10
End With
End Function
Set L1 = BarForm.Controls.Add("forms.label.1", "Label1", True)
C'est une erreur par rapport à l'objet.
Bonjour Frédéric,
Je n'ai pas testé ton code... mais tu dois avoir un problème là :
q = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value -
Worksheets("STOCKprod").Range("A3:D" &
Range("A1000").End(xlUp).Row).Find(p).Offset(0, 3).Value
ça devrait plutôt ressembler à ceci :
s = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value
with Worksheets("STOCKprod")
With .Range("A3:D" & .Range("A1000").End(xlUp).Row).
r= .Find(p).Offset(0, 3).Value
End with
End with
Q = S - R
Il doit y avoir un point devant chaque "Range" pour siginifier quelle est la
feuille source de la plage.
..Range("A3:D" & .Range("A1000").End(xlUp).Row).
P.S. La méthode Find ... si tu n'utilises pas certains PARAMÈTRES va finir par te causer
des problèmes... prend le temps de lire dans l'aide toute l'information sur
cette méthode...
C'est spécial .... car la méthode recherche dans A3:Dx et peu importe où elle
trouve l'information (colonne) , tu extraits toujours la valeur 3 colonnes à droite !!!! ?
Salutations!
"Frederic" a écrit dans le message de news:
Bonjour à tous, j'ai a nouveau besoin d'aide!
Je crée de maniére dynamique un form représentant un Ordre de Fab. Celui ci
est donc toujours le meme, sauf son nom et intitulé qui change.Ensuite , je
crée par code les labels et textbox de ce form.
Mon proble est que le nom du form est lié à une variable et le code me
retourne une erreur a cause du nom.
Voici mon code: Si quelqu'un pouvait m'aider.
Merci
Dim BarForm As Object, p As Variant, q As Integer, N As Variant
Dim L1 As MSForms.Label, L2 As MSForms.Label, L3 As MSForms.Label
Dim T1 As MSForms.textbox, T2 As MSForms.textbox, T3 As MSForms.textbox
Function CreationOF()
Dim q As Integer, p As Variant
p = Worksheets("CommandeCLIENT").Range("C1000").End(xlUp).Value
q = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value -
Worksheets("STOCKprod").Range("A3:D" &
Range("A1000").End(xlUp).Row).Find(p).Offset(0, 3).Value
N = Worksheets("CommandeCLIENT").Range("A1000").End(xlUp).Value
'userform
Set BarForm = ThisWorkbook.VBProject.VBComponents.Add(3)
With BarForm
.Properties("Caption") = " OF " & N
.Properties("Width") = 130
.Properties("Height") = 150
End With
'label sur userform
Set L1 = BarForm.Controls.Add("forms.label.1", "Label1", True)
With L1
.Text = "Produit"
.Left = 5
.Top = 5
.Width = 120
.Height = 18
.Name = "Label1"
.Font.Bold = True
.Font.Size = 10
End With
Set L2 = BarForm.Controls.Add("forms.label.1", "Label2", True)
With L2
.Text = "Quantité"
.Left = 1
.Top = 50
.Width = 50
.Height = 18
.Name = "Label2"
.Font.Bold = True
.Font.Size = 10
End With
Set L3 = BarForm.Controls.Add("forms.label.1", "Label3", True)
With L3
.Text = "Délai"
.Left = 1
.Top = 70
.Width = 50
.Height = 18
.Name = "Label3"
.Font.Bold = True
.Font.Size = 10
End With
'textbox sur userform
Set T1 = BarForm.Controls.Add("forms.textbox.1", "textbox1", True)
With T1
.Text = p
.Left = 5
.Top = 25
.Width = 120
.Height = 18
.Name = "textbox1"
.Font.Bold = True
.Font.Size = 10
End With
Set T2 = BarForm.Controls.Add("forms.textbox.1", "textbox2", True)
With T2
.Text = q
.Left = 55
.Top = 50
.Width = 44
.Height = 18
.Name = "textbox2"
.Font.Bold = True
.Font.Size = 10
End With
Set T3 = BarForm.Controls.Add("forms.textbox.1", "textbox3", True)
With T3
.Text > Worksheets("CommandeCLIENT").Range("E1000").End(xlUp).Value
.Left = 55
.Top = 70
.Width = 44
.Height = 18
.Name = "textbox3"
.Font.Bold = True
.Font.Size = 10
End With
End Function
Set L1 = BarForm.Controls.Add("forms.label.1", "Label1", True)
C'est une erreur par rapport à l'objet.
Bonjour Frédéric,
Je n'ai pas testé ton code... mais tu dois avoir un problème là :
q = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value -
Worksheets("STOCKprod").Range("A3:D" &
Range("A1000").End(xlUp).Row).Find(p).Offset(0, 3).Value
ça devrait plutôt ressembler à ceci :
s = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value
with Worksheets("STOCKprod")
With .Range("A3:D" & .Range("A1000").End(xlUp).Row).
r= .Find(p).Offset(0, 3).Value
End with
End with
Q = S - R
Il doit y avoir un point devant chaque "Range" pour siginifier quelle est la
feuille source de la plage.
..Range("A3:D" & .Range("A1000").End(xlUp).Row).
P.S. La méthode Find ... si tu n'utilises pas certains PARAMÈTRES va finir par te causer
des problèmes... prend le temps de lire dans l'aide toute l'information sur
cette méthode...
C'est spécial .... car la méthode recherche dans A3:Dx et peu importe où elle
trouve l'information (colonne) , tu extraits toujours la valeur 3 colonnes à droite !!!! ?
Salutations!
"Frederic" a écrit dans le message de news:
Bonjour à tous, j'ai a nouveau besoin d'aide!
Je crée de maniére dynamique un form représentant un Ordre de Fab. Celui ci
est donc toujours le meme, sauf son nom et intitulé qui change.Ensuite , je
crée par code les labels et textbox de ce form.
Mon proble est que le nom du form est lié à une variable et le code me
retourne une erreur a cause du nom.
Voici mon code: Si quelqu'un pouvait m'aider.
Merci
Dim BarForm As Object, p As Variant, q As Integer, N As Variant
Dim L1 As MSForms.Label, L2 As MSForms.Label, L3 As MSForms.Label
Dim T1 As MSForms.textbox, T2 As MSForms.textbox, T3 As MSForms.textbox
Function CreationOF()
Dim q As Integer, p As Variant
p = Worksheets("CommandeCLIENT").Range("C1000").End(xlUp).Value
q = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value -
Worksheets("STOCKprod").Range("A3:D" &
Range("A1000").End(xlUp).Row).Find(p).Offset(0, 3).Value
N = Worksheets("CommandeCLIENT").Range("A1000").End(xlUp).Value
'userform
Set BarForm = ThisWorkbook.VBProject.VBComponents.Add(3)
With BarForm
.Properties("Caption") = " OF " & N
.Properties("Width") = 130
.Properties("Height") = 150
End With
'label sur userform
Set L1 = BarForm.Controls.Add("forms.label.1", "Label1", True)
With L1
.Text = "Produit"
.Left = 5
.Top = 5
.Width = 120
.Height = 18
.Name = "Label1"
.Font.Bold = True
.Font.Size = 10
End With
Set L2 = BarForm.Controls.Add("forms.label.1", "Label2", True)
With L2
.Text = "Quantité"
.Left = 1
.Top = 50
.Width = 50
.Height = 18
.Name = "Label2"
.Font.Bold = True
.Font.Size = 10
End With
Set L3 = BarForm.Controls.Add("forms.label.1", "Label3", True)
With L3
.Text = "Délai"
.Left = 1
.Top = 70
.Width = 50
.Height = 18
.Name = "Label3"
.Font.Bold = True
.Font.Size = 10
End With
'textbox sur userform
Set T1 = BarForm.Controls.Add("forms.textbox.1", "textbox1", True)
With T1
.Text = p
.Left = 5
.Top = 25
.Width = 120
.Height = 18
.Name = "textbox1"
.Font.Bold = True
.Font.Size = 10
End With
Set T2 = BarForm.Controls.Add("forms.textbox.1", "textbox2", True)
With T2
.Text = q
.Left = 55
.Top = 50
.Width = 44
.Height = 18
.Name = "textbox2"
.Font.Bold = True
.Font.Size = 10
End With
Set T3 = BarForm.Controls.Add("forms.textbox.1", "textbox3", True)
With T3
.Text > Worksheets("CommandeCLIENT").Range("E1000").End(xlUp).Value
.Left = 55
.Top = 70
.Width = 44
.Height = 18
.Name = "textbox3"
.Font.Bold = True
.Font.Size = 10
End With
End Function
Set L1 = BarForm.Controls.Add("forms.label.1", "Label1", True)
C'est une erreur par rapport à l'objet.
Bonjour Frédéric,
Je n'ai pas testé ton code... mais tu dois avoir un problème là :
q = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value -
Worksheets("STOCKprod").Range("A3:D" &
Range("A1000").End(xlUp).Row).Find(p).Offset(0, 3).Value
ça devrait plutôt ressembler à ceci :
s = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value
with Worksheets("STOCKprod")
With .Range("A3:D" & .Range("A1000").End(xlUp).Row).
r= .Find(p).Offset(0, 3).Value
End with
End with
Q = S - R
Il doit y avoir un point devant chaque "Range" pour siginifier quelle est la
feuille source de la plage.
..Range("A3:D" & .Range("A1000").End(xlUp).Row).
P.S. La méthode Find ... si tu n'utilises pas certains PARAMÈTRES va finir par te causer
des problèmes... prend le temps de lire dans l'aide toute l'information sur
cette méthode...
C'est spécial .... car la méthode recherche dans A3:Dx et peu importe où elle
trouve l'information (colonne) , tu extraits toujours la valeur 3 colonnes à droite !!!! ?
Salutations!
"Frederic" <Frederic@discussions.microsoft.com> a écrit dans le message de news:
5ED8F365-F45A-44D6-AA0E-6745CC019194@microsoft.com...
Bonjour à tous, j'ai a nouveau besoin d'aide!
Je crée de maniére dynamique un form représentant un Ordre de Fab. Celui ci
est donc toujours le meme, sauf son nom et intitulé qui change.Ensuite , je
crée par code les labels et textbox de ce form.
Mon proble est que le nom du form est lié à une variable et le code me
retourne une erreur a cause du nom.
Voici mon code: Si quelqu'un pouvait m'aider.
Merci
Dim BarForm As Object, p As Variant, q As Integer, N As Variant
Dim L1 As MSForms.Label, L2 As MSForms.Label, L3 As MSForms.Label
Dim T1 As MSForms.textbox, T2 As MSForms.textbox, T3 As MSForms.textbox
Function CreationOF()
Dim q As Integer, p As Variant
p = Worksheets("CommandeCLIENT").Range("C1000").End(xlUp).Value
q = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value -
Worksheets("STOCKprod").Range("A3:D" &
Range("A1000").End(xlUp).Row).Find(p).Offset(0, 3).Value
N = Worksheets("CommandeCLIENT").Range("A1000").End(xlUp).Value
'userform
Set BarForm = ThisWorkbook.VBProject.VBComponents.Add(3)
With BarForm
.Properties("Caption") = " OF " & N
.Properties("Width") = 130
.Properties("Height") = 150
End With
'label sur userform
Set L1 = BarForm.Controls.Add("forms.label.1", "Label1", True)
With L1
.Text = "Produit"
.Left = 5
.Top = 5
.Width = 120
.Height = 18
.Name = "Label1"
.Font.Bold = True
.Font.Size = 10
End With
Set L2 = BarForm.Controls.Add("forms.label.1", "Label2", True)
With L2
.Text = "Quantité"
.Left = 1
.Top = 50
.Width = 50
.Height = 18
.Name = "Label2"
.Font.Bold = True
.Font.Size = 10
End With
Set L3 = BarForm.Controls.Add("forms.label.1", "Label3", True)
With L3
.Text = "Délai"
.Left = 1
.Top = 70
.Width = 50
.Height = 18
.Name = "Label3"
.Font.Bold = True
.Font.Size = 10
End With
'textbox sur userform
Set T1 = BarForm.Controls.Add("forms.textbox.1", "textbox1", True)
With T1
.Text = p
.Left = 5
.Top = 25
.Width = 120
.Height = 18
.Name = "textbox1"
.Font.Bold = True
.Font.Size = 10
End With
Set T2 = BarForm.Controls.Add("forms.textbox.1", "textbox2", True)
With T2
.Text = q
.Left = 55
.Top = 50
.Width = 44
.Height = 18
.Name = "textbox2"
.Font.Bold = True
.Font.Size = 10
End With
Set T3 = BarForm.Controls.Add("forms.textbox.1", "textbox3", True)
With T3
.Text > Worksheets("CommandeCLIENT").Range("E1000").End(xlUp).Value
.Left = 55
.Top = 70
.Width = 44
.Height = 18
.Name = "textbox3"
.Font.Bold = True
.Font.Size = 10
End With
End Function
Set L1 = BarForm.Controls.Add("forms.label.1", "Label1", True)
C'est une erreur par rapport à l'objet.
Bonjour Frédéric,
Je n'ai pas testé ton code... mais tu dois avoir un problème là :
q = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value -
Worksheets("STOCKprod").Range("A3:D" &
Range("A1000").End(xlUp).Row).Find(p).Offset(0, 3).Value
ça devrait plutôt ressembler à ceci :
s = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value
with Worksheets("STOCKprod")
With .Range("A3:D" & .Range("A1000").End(xlUp).Row).
r= .Find(p).Offset(0, 3).Value
End with
End with
Q = S - R
Il doit y avoir un point devant chaque "Range" pour siginifier quelle est la
feuille source de la plage.
..Range("A3:D" & .Range("A1000").End(xlUp).Row).
P.S. La méthode Find ... si tu n'utilises pas certains PARAMÈTRES va finir par te causer
des problèmes... prend le temps de lire dans l'aide toute l'information sur
cette méthode...
C'est spécial .... car la méthode recherche dans A3:Dx et peu importe où elle
trouve l'information (colonne) , tu extraits toujours la valeur 3 colonnes à droite !!!! ?
Salutations!
"Frederic" a écrit dans le message de news:
Bonjour à tous, j'ai a nouveau besoin d'aide!
Je crée de maniére dynamique un form représentant un Ordre de Fab. Celui ci
est donc toujours le meme, sauf son nom et intitulé qui change.Ensuite , je
crée par code les labels et textbox de ce form.
Mon proble est que le nom du form est lié à une variable et le code me
retourne une erreur a cause du nom.
Voici mon code: Si quelqu'un pouvait m'aider.
Merci
Dim BarForm As Object, p As Variant, q As Integer, N As Variant
Dim L1 As MSForms.Label, L2 As MSForms.Label, L3 As MSForms.Label
Dim T1 As MSForms.textbox, T2 As MSForms.textbox, T3 As MSForms.textbox
Function CreationOF()
Dim q As Integer, p As Variant
p = Worksheets("CommandeCLIENT").Range("C1000").End(xlUp).Value
q = Worksheets("CommandeCLIENT").Range("D1000").End(xlUp).Value -
Worksheets("STOCKprod").Range("A3:D" &
Range("A1000").End(xlUp).Row).Find(p).Offset(0, 3).Value
N = Worksheets("CommandeCLIENT").Range("A1000").End(xlUp).Value
'userform
Set BarForm = ThisWorkbook.VBProject.VBComponents.Add(3)
With BarForm
.Properties("Caption") = " OF " & N
.Properties("Width") = 130
.Properties("Height") = 150
End With
'label sur userform
Set L1 = BarForm.Controls.Add("forms.label.1", "Label1", True)
With L1
.Text = "Produit"
.Left = 5
.Top = 5
.Width = 120
.Height = 18
.Name = "Label1"
.Font.Bold = True
.Font.Size = 10
End With
Set L2 = BarForm.Controls.Add("forms.label.1", "Label2", True)
With L2
.Text = "Quantité"
.Left = 1
.Top = 50
.Width = 50
.Height = 18
.Name = "Label2"
.Font.Bold = True
.Font.Size = 10
End With
Set L3 = BarForm.Controls.Add("forms.label.1", "Label3", True)
With L3
.Text = "Délai"
.Left = 1
.Top = 70
.Width = 50
.Height = 18
.Name = "Label3"
.Font.Bold = True
.Font.Size = 10
End With
'textbox sur userform
Set T1 = BarForm.Controls.Add("forms.textbox.1", "textbox1", True)
With T1
.Text = p
.Left = 5
.Top = 25
.Width = 120
.Height = 18
.Name = "textbox1"
.Font.Bold = True
.Font.Size = 10
End With
Set T2 = BarForm.Controls.Add("forms.textbox.1", "textbox2", True)
With T2
.Text = q
.Left = 55
.Top = 50
.Width = 44
.Height = 18
.Name = "textbox2"
.Font.Bold = True
.Font.Size = 10
End With
Set T3 = BarForm.Controls.Add("forms.textbox.1", "textbox3", True)
With T3
.Text > Worksheets("CommandeCLIENT").Range("E1000").End(xlUp).Value
.Left = 55
.Top = 70
.Width = 44
.Height = 18
.Name = "textbox3"
.Font.Bold = True
.Font.Size = 10
End With
End Function