Dim a As Long
Dim b As Long
Private Sub UserForm_Activate()
UserForm1.Height = Application.Height
UserForm1.Width = Application.Width
End Sub
Private Sub TextBox0_Change()
a = 1: b = 1: Cells(a, b) = UCase(TextBox0): TextBox1.Visible = False: TextBox1.Value = ""
If Len(TextBox0) = 4 Then
If TextBox1.Top <> TextBox0.Top Then TextBox1.Top = TextBox0.Top: TextBox1.Left = TextBox0.Left + 80
TextBox1.Visible = True
TextBox1_Change
End If
End Sub
Private Sub TextBox1_Change()
a = 1: b = 2: Cells(a, b) = UCase(TextBox1): Cells(a, b - 1) = TextBox0
If Len(TextBox1) = 4 Then lb
End Sub
Sub lb()
Set Label = Controls.Add("forms.label.1", "label" & a, Visible = True) ' creation automatique du label nommé nom de label
Label.Left = 157 ' label à afficher 200 pixels à gauche
Label.BackColor = &HFFFFFF: Label.ForeColor = &H80000007: Label.Caption = UCase(Cells(a, b)): Label.Top = TextBox1.Top
Label.Left = TextBox1.Left: Label.TextAlign = fmTextAlignCenter
If Len(TextBox1) = 4 Then Selection.EntireRow.Insert: TextBox1 = "": TextBox1.Top = TextBox1.Top + 20
If TextBox1.Top = 540 Then TextBox1.Top = 140: TextBox1.Left = TextBox1.Left + 77
End Sub
Voici mon petit programe. Je crée des labels aux besoin
je ne connais pas boucoup la programation je sais qu'il me manque qu'elle que chose et je n'arrive pas a le trouver.
Ce que j'aimerais faire c'est lorsque je click sur un label que le textbox1 prenne ca place pour que je puisse modifier la valeur de ce label
Si qu'elle qu'un peut m'aider S.V.P.
Merci boucoup
Dim b As Long
Private Sub UserForm_Activate()
UserForm1.Height = Application.Height
UserForm1.Width = Application.Width
End Sub
Private Sub TextBox0_Change()
a = 1: b = 1: Cells(a, b) = UCase(TextBox0): TextBox1.Visible = False: TextBox1.Value = ""
If Len(TextBox0) = 4 Then
If TextBox1.Top <> TextBox0.Top Then TextBox1.Top = TextBox0.Top: TextBox1.Left = TextBox0.Left + 80
TextBox1.Visible = True
TextBox1_Change
End If
End Sub
Private Sub TextBox1_Change()
a = 1: b = 2: Cells(a, b) = UCase(TextBox1): Cells(a, b - 1) = TextBox0
If Len(TextBox1) = 4 Then lb
End Sub
Sub lb()
Set Label = Controls.Add("forms.label.1", "label" & a, Visible = True) ' creation automatique du label nommé nom de label
Label.Left = 157 ' label à afficher 200 pixels à gauche
Label.BackColor = &HFFFFFF: Label.ForeColor = &H80000007: Label.Caption = UCase(Cells(a, b)): Label.Top = TextBox1.Top
Label.Left = TextBox1.Left: Label.TextAlign = fmTextAlignCenter
If Len(TextBox1) = 4 Then Selection.EntireRow.Insert: TextBox1 = "": TextBox1.Top = TextBox1.Top + 20
If TextBox1.Top = 540 Then TextBox1.Top = 140: TextBox1.Left = TextBox1.Left + 77
End Sub
Voici mon petit programe. Je crée des labels aux besoin
je ne connais pas boucoup la programation je sais qu'il me manque qu'elle que chose et je n'arrive pas a le trouver.
Ce que j'aimerais faire c'est lorsque je click sur un label que le textbox1 prenne ca place pour que je puisse modifier la valeur de ce label
Si qu'elle qu'un peut m'aider S.V.P.
Merci boucoup