Private Sub cmdClearForm_Click()
Call UserForm_Initialize
End Sub
Private Sub cmdOk_Click()
ActiveWorkbook.Sheets("Course Bookings").Activate
Range("A1").Select
Do
If IsEmpty(ActiveCell) = False Then
ActiveCell.Offset(1, 0).Select
End If
Loop Until IsEmpty(ActiveCell) = True
ActiveCell.Value = txtName.Value
ActiveCell.Offset(0, 1) = txtPhone.Value
ActiveCell.Offset(0, 2) = cboDepartment.Value
End If
Range("A1").Select
End Sub
Private Sub cmdButt_Click()
Sub OpenCourseBookingForm()
frmCourseBooking.Show
End Sub
Private Sub UserForm_Initialize()
txtName.Value = ""
txtPhone.Value = ""
With cboDepartment
.AddItem "Sales"
.AddItem "Finance"
.AddItem "Technical"
.AddItem "Stores"
.AddItem "Dispatch"
End With
cboDepartment.Value = ""
End With
txtCall.Value = ""
End With
refNature.Value = ""
End Sub
Bookmarks