i am doing something wrong. i am reusing a userform and table and d want to pass it on but somehow all the previous code is erroring on A4 select then xldown
where is my mistake?
where is my mistake?
Rich (BB code):
Private Sub cboActions_Change()
If Me.TextBoxActions.Value = "" Then
Me.lblActionsProvided.ForeColor = vbRed
Else
Me.lblActionsProvided.ForeColor = vbBlack
End If
End Sub
___________________________________________________
Private Sub Clear_Click()
Dim ctrl As Control
For Each ctrl In Me.Controls
If TypeName(ctrl) = "ComboBox" Or TypeName(ctrl) = "TextBox" Then
ctrl.Value = ""
End If
Next ctrl
Me.txtDateToday.Value = Format(Date, "mmmm dd, yyyy")
Me.CboParticipants.SetFocus
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
______________________________________________
Private Sub Enter_Click()
ActiveWorkbook.Worksheets("Log").Select
Range("A4").Select
If ActiveCell.Value = "" Then
ActiveCell.Select
Else
Selection.End(xlDown).Offset(1, 0).Select
End If
If Me.CboParticipants.Value = "" Then
Me.lblParticipantsName.ForeColor = vbRed
Me.CboParticipants.SetFocus
Exit Sub
End If
If Me.TextBoxActions.Value = "" Then
Me.lblActionsProvided.ForeColor = vbRed
Me.TextBoxActions.SetFocus
Exit Sub
End If
ActiveCell.Value = Me.CboParticipants
ActiveCell.Offset(0, 1).Value = Me.txtDateToday
ActiveCell.Offset(0, 2).Value = Me.TextBoxActions
ActiveCell.Offset(0, 3).Value = Me.TextBoxFollowUp
Call Clear_Click
Me.lblActionsProvided.ForeColor = vbBlack
Me.lblParticipantsName.ForeColor = vbBlack
Call cmdClose_Click
End Sub
_______________________________________
Private Sub cboNameofParticipant_Change()
If Me.CboParticipants.Value = "" Then
Me.lblParticipantsName.ForeColor = vbRed
Else
Me.lblParticipantsName.ForeColor = vbBlack
End If
End Sub
Private Sub UserForm_Initialize()
Me.CboParticipants.List = Worksheets("Participants").Range("Participants").Value
Me.txtDateToday = Format(Date, "mmmm dd, yyyy")
Me.CboParticipants.SetFocus
End Sub