Tengo un formato el cual ocupare para rastrear los días que el legal tarda en dar respuesta a los requerimientos que realizo
Tengo un formato el cual ocupare para rastrear los días que el legal tarda en dar respuesta a los requerimientos que realizo, solo que tengo un erro que no puedo quitar de mi archivo el cual tiene este código
Private Sub ComboBox1_Change()
End Sub
Private Sub CommandButton1_Click()
End Sub
Private Sub CommandButton2_Click()
TextBox7.Value = (Val(TextBox5.Value) * Val(TextBox6.Value))
End Sub
Private Sub CommandButton3_Click()
TextBox6.Value = (Val(TextBox7.Value) / Val(TextBox5.Value))
End Sub
Private Sub CommandButton4_Click()
Call ThisWorkbook.Macro3
' Select the range of cells on the active worksheet.
ActiveSheet.Range("B3:J48").Select
' Show the envelope on the ActiveWorkbook.
ActiveWorkbook.EnvelopeVisible = True
' Set the optional introduction field thats adds
' some header text to the email body. It also sets
' the To and Subject lines. Finally the message
' is sent.
With ActiveSheet.MailEnvelope
.Introduction = "Envio solicitud de" & " " & Worksheets("FORMATO").Range("F11").Value & " para " & Worksheets("FORMATO").Range("F9").Value & " de la cadena " & Worksheets("FORMATO").Range("F10").Value
.Item.To = "[email protected]"
.Item.Subject = Worksheets("FORMATO").Range("F11").Value & " de " & Worksheets("FORMATO").Range("F9").Value & " para la cadena " & Worksheets("FORMATO").Range("F10").Value
.Item.Send
End With
Dim objectOutlook As Object
Dim objectTarea As Object
Set objectOutlook = CreateObject("Outlook.Application")
Set objectTarea = objectOutlook.CreateItem(olTaskItem)
'Set objectTarea = objectOutlook.CreateItem(IPM.Task.Tarea9)
With objectTarea
.Subject = Worksheets("FORMATO").Range("F11").Value & " de " & Worksheets("FORMATO").Range("F9").Value & " para la cadena " & Worksheets("FORMATO").Range("F10").Value
.Body = " Solicitud pendiente de" & " " & Worksheets("FORMATO").Range("F11").Value & " para " & Worksheets("FORMATO").Range("F9").Value & " de la cadena " & Worksheets("FORMATO").Range("F10").Value
.ReminderSet = True 'Recordar True/False
.ReminderTime = DateAdd("h", 72, Now) 'Recordar cada 72 horas si .ReminderSet = True
.DueDate = Worksheets("FORMATO").Range("F5").Value
.Save
End With
Set objectTarea = Nothing
Set objectOutlook = Nothing
Dim Resp As Byte
Resp = MsgBox("Solicitud enviada correctamente,salir de aplicacion?", _
vbQuestion + vbYesNo, "EXCELeINFO")
If Resp = vbYes Then
Sheets("Datos").Visible = True
Sheets("BD").Visible = True
Application.Quit
Else
Application.Quit
End If
End Sub
Private Sub DTPicker1_CallbackKeyDown(ByVal KeyCode As Integer, ByVal Shift As Integer, ByVal CallbackField As String, CallbackDate As Date)
End Sub
Private Sub TextBox1_Change()
End Sub
Private Sub Label16_Click()
End Sub
Private Sub TextBox13_Change()
End Sub
Private Sub TextBox14_Change()
End Sub
Private Sub TextBox5_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If KeyAscii < 48 Or KeyAscii > 57 Then
KeyAscii = 0
End If
End Sub
Private Sub TextBox6_KeyPress(ByVal KeyAscii As MSForms.ReturnInteger)
If KeyAscii < 48 Or KeyAscii > 57 Then
KeyAscii = 0
End If
End Sub
Private Sub TextBox8_AfterUpdate()
TextBox8.Text = Format(TextBox8.Text, "##%")
End Sub
Private Sub UserForm_activate()
Sheets("Datos").Select
Range("D2").Select
Do While ActiveCell <> Empty
ActiveCell.Offset(1, 0).Select
ComboBox1.AddItem ActiveCell
Loop
ComboBox1.SetFocus
Sheets("Datos").Select
Range("C2").Select
Do While ActiveCell <> Empty
ActiveCell.Offset(1, 0).Select
ComboBox2.AddItem ActiveCell
Loop
ComboBox2.SetFocus
Sheets("Datos").Select
Range("B2").Select
Do While ActiveCell <> Empty
ActiveCell.Offset(1, 0).Select
ComboBox3.AddItem ActiveCell
Loop
ComboBox2.SetFocus
With ActiveWindow
Sheets("Datos").Visible = False
Sheets("BD").Visible = False
End With
End Sub
lo que no me funciona es el modulo para insertar datos
Sub Macro3()
Worksheets("FORMATO").Activate
Worksheets("FORMATO").Unprotect
Worksheets("FORMATO").Range("F11").Value = ComboBox1.Value
Worksheets("FORMATO").Range("F10").Value = ComboBox2.Value
Worksheets("FORMATO").Range("F9").Value = ComboBox3.Value
Worksheets("FORMATO").Range("F12").Value = TextBox3.Value
Worksheets("FORMATO").Range("F13").Value = TextBox4.Value
Worksheets("FORMATO").Range("F14").Value = TextBox5.Value
Worksheets("FORMATO").Range("F15").Value = TextBox6.Value
Worksheets("FORMATO").Range("F16").Value = TextBox7.Value
Worksheets("FORMATO").Range("F17").Value = TextBox8.Value
Worksheets("FORMATO").Range("F18").Value = TextBox9.Value
Worksheets("FORMATO").Range("F19").Value = TextBox10.Value
Worksheets("FORMATO").Range("F20").Value = TextBox11.Value
Worksheets("FORMATO").Range("F21").Value = TextBox12.Value
Worksheets("FORMATO").Range("F22").Value = TextBox13.Value
Worksheets("FORMATO").Range("F23").Value = DTPicker1.Value
Worksheets("FORMATO").Range("B25").Value = TextBox14.Value
End Sub
Error 422