Hi everybody,
I want to create a database using VBA code with user form. Can anyone help me please? I am attaching a VBA, but I get an error with this file when i execute it. Thanks in advance.
Printable View
Hi everybody,
I want to create a database using VBA code with user form. Can anyone help me please? I am attaching a VBA, but I get an error with this file when i execute it. Thanks in advance.
I think the WB was corrupted some how.
The "Data" sheet was there, but not registered
Attachment 17212
Try this corrected version
Thanks Paul, but I still get an error. Please can you help me?
Attachment 17217
I can call the macro from the button and since 'Data' sheet is there it goes farther
Stepping through and looking at the line that fails, the text box is named 'txtEmplName' and not 'txtEmpName' (missing the L)
There might be moreCode:Private Sub cmdNew_Click()
blnNew = True
txtEmpNo.Text = ""
txtEmplName.Text = "" '<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
txtAdd1.Text = ""
txtAdd2.Text = ""
txtAdd3.Text = ""
txtTel.Text = ""
txtDesignation.Text = ""
cmdClose.Caption = "Cancel"
cmdNew.Enabled = False
cmdDelete.Enabled = False
End Sub
Thanks Paul, but I still can not execute the program. Can you help me please?
There is sort of VBA error . Thanks