VBA Form Locked for Input
Anouchka2586
Posted messages
47
Registration date
Status
Membre
Last intervention
-
f894009 Posted messages 17417 Registration date Status Membre Last intervention -
f894009 Posted messages 17417 Registration date Status Membre Last intervention -
Hello
I created this form in VBA and all of a sudden, it is now frozen, unable to input in the fields. It's as if another dialog box is open and preventing input in the form. Can someone help me, thanks!
Here are my captures:
----------Code below -------------
Private Sub Button4Fermer_Click()
Unload FormRegister
End Sub
Private Sub ButtonAjouter_Click()
'Double click on the add button
If ComboBox2.Value = " " Then
MsgBox "Please fill in the name and surname field"
Else
Dim ligne As Integer
If MsgBox("Do you confirm the addition of the data?", vbYesNo, "confirmation") = vbYes Then
Worksheets("Feuil2").Select
'number of the empty row in column A
ligne = Sheets("Feuil2").Range("A456541").End(xlUp).Row + 1
Cells(ligne, 1) = ComboBox_civilite.Value
Cells(ligne, 2) = ComboBox_nomprenom.Value
Cells(ligne, 3) = Txt_adresse.Value
Cells(ligne, 4) = Txt_codepostal.Value
Cells(ligne, 5) = Txt_ville.Value
Cells(ligne, 6) = Txt_telephone.Value
Cells(ligne, 7) = Txt_email.Value
Unload FormRegister
FormRegister.Show
Else
End If
End If
End Sub
Private Sub UserForm_Initialize()
ComboBox_civilite.AddItem "Mrs."
ComboBox_civilite.AddItem "Miss"
ComboBox_civilite.AddItem "Mr."
FormRegister.Height = 500
FormRegister.Width = 500
End Sub
Configuration: Windows / Chrome 96.0.4664.93
I created this form in VBA and all of a sudden, it is now frozen, unable to input in the fields. It's as if another dialog box is open and preventing input in the form. Can someone help me, thanks!
Here are my captures:
----------Code below -------------
Private Sub Button4Fermer_Click()
Unload FormRegister
End Sub
Private Sub ButtonAjouter_Click()
'Double click on the add button
If ComboBox2.Value = " " Then
MsgBox "Please fill in the name and surname field"
Else
Dim ligne As Integer
If MsgBox("Do you confirm the addition of the data?", vbYesNo, "confirmation") = vbYes Then
Worksheets("Feuil2").Select
'number of the empty row in column A
ligne = Sheets("Feuil2").Range("A456541").End(xlUp).Row + 1
Cells(ligne, 1) = ComboBox_civilite.Value
Cells(ligne, 2) = ComboBox_nomprenom.Value
Cells(ligne, 3) = Txt_adresse.Value
Cells(ligne, 4) = Txt_codepostal.Value
Cells(ligne, 5) = Txt_ville.Value
Cells(ligne, 6) = Txt_telephone.Value
Cells(ligne, 7) = Txt_email.Value
Unload FormRegister
FormRegister.Show
Else
End If
End If
End Sub
Private Sub UserForm_Initialize()
ComboBox_civilite.AddItem "Mrs."
ComboBox_civilite.AddItem "Miss"
ComboBox_civilite.AddItem "Mr."
FormRegister.Height = 500
FormRegister.Width = 500
End Sub
Configuration: Windows / Chrome 96.0.4664.93