@AfonsoMira
Private Sub CommandButton1_Click()
If ComboBox1.Value = "" Then
MsgBox "Selecione o colaborador", vbInformation, "Ítem obrigatório"
Exit Sub
End If
If TextBox8.Value = "" Then
MsgBox "Selecione a data", vbInformation, "Ítem obrigatório"
Exit Sub
End If
Dim PLAN As String
PLAN = UserForm1.ComboBox1.Text
dia = UserForm1.TextBox8.Text
Worksheets(PLAN).Activate
linha = Cells.Find(dia).Row
ActiveSheet.Cells(linha, 7) = UserForm1.TextBox1.Text
ActiveSheet.Cells(linha, 8) = UserForm1.TextBox2.Text
ActiveSheet.Cells(linha, 9) = UserForm1.TextBox3.Text
ActiveSheet.Cells(linha, 10) = UserForm1.TextBox4.Text
ActiveSheet.Cells(linha, 11) = UserForm1.TextBox5.Text
ActiveSheet.Cells(linha, 12) = UserForm1.TextBox6.Text
If CheckBox1.Value = True Then
ActiveSheet.Cells(linha, 6) = "X"
End If
If CheckBox2.Value = True Then
ActiveSheet.Cells(linha, 5) = "X"
End If
UserForm1.TextBox1.Value = Empty
UserForm1.TextBox2.Value = Empty
UserForm1.TextBox3.Value = Empty
UserForm1.TextBox4.Value = Empty
UserForm1.TextBox5.Value = Empty
UserForm1.TextBox6.Value = Empty
UserForm1.CheckBox1.Value = False
UserForm1.CheckBox2.Value = False
MsgBox ("Dados salvos na planilha com sucesso"), vbInformation, "Sucesso"
End Sub
Dá erro na parte: linha = Cells.Find(dia).Row