Hi,
I am new to vba userforms but have created a few which allow the user to input data into several fields using text boxes and combo boxes.
Once they have filled the form in, I have set a command button which transfers the data to a worksheet. What I would also like this command button to do is to send the data fields to an email address, in the body of the email.
Is there anybody who could give me some guidance, I would be very grateful.
The text for the command button (cmdEnter) currently looks like this:
Private Sub cmdEnter_Click()
'Range("A9").Value = txtDate
'Range("B9").Value = txtTime
'Range("C9").Value = cboType
'Range("D9").Value = txtInitials
'Range("E9").Value = cbo06
'Range("F9").Value = cboMid
'Range("G9").Value = cbo24
'Range("I9").Value = txtComments
erow = Sheets("Runway Inspections").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Sheets("Runway Inspections").Cells(erow, 1).Value = txtDate.Text
Sheets("Runway Inspections").Cells(erow, 2).Value = txtTime.Text
Sheets("Runway Inspections").Cells(erow, 3).Value = cboType.Text
Sheets("Runway Inspections").Cells(erow, 4).Value = txtInitials.Text
Sheets("Runway Inspections").Cells(erow, 5).Value = cbo06.Text
Sheets("Runway Inspections").Cells(erow, 6).Value = cboMid.Text
Sheets("Runway Inspections").Cells(erow, 7).Value = cbo24.Text
Sheets("Runway Inspections").Cells(erow, 9).Value = txtComments.Text
Unload Me
End Sub
Many thanks
Dan
Bookmarks