Good evening friends, I hope you are well, I am having some problems with the following macros within the frmcdr Form:
1. If the ComboBox1 = "AT" and the OptSI = True then TextBox14 = LCPT, TextBox15 = TextBox2 and the TextBox17.Value = TextBox16.Value with the following macro I have achieved that TextBox14 = LCPT however I cannot automatically achieve that the TextBox15 = TextBox2 or TextBox17.Value = TextBox16.Value
2. If the ComboBox1 = "EO" and the OptSI = True then TextBox5 = “”, TextBox10.Value = TextBox18.Value and the TextBox17.Value = ComboBox2.Value tried with the following macro but it failed to automatically set the TextBox10. Value = TextBox18.Value or TextBox17.Value
End Sub[/CODE]
3. Depending on the automatic modification of the data in the TextBox14 (TDL), TextBox15 (CDD - AT) TextBox17 (TDD) and TextBox10 (CEO) in accordance with the previous macros, it requires that clicking on the CommandButton5 (Save) automatically modifies and saves the information coming from the TextBoxes in the Columns TDL, CDD – AT, TDD and CEO of Listbox1 and consequently in the Columns “AQ” (TDL), “AS” (CDD – AT), “AT” ( TDD) and “AV” (CEO) from Sheet3 (MATRIZ ), tried the following macro, but it tells me that “Error “91” has occurred at run time: Object or block variable not set” as shown. shown in Image2:
1. If the ComboBox1 = "AT" and the OptSI = True then TextBox14 = LCPT, TextBox15 = TextBox2 and the TextBox17.Value = TextBox16.Value with the following macro I have achieved that TextBox14 = LCPT however I cannot automatically achieve that the TextBox15 = TextBox2 or TextBox17.Value = TextBox16.Value
Code:
Private Sub OptSI_Click()
If OptSI1 = True or ComboBox1 = "AT" Then
TextBox14.Value = "LCPT"
TextBox15.Value = TextBox2.Value
TextBox17.Value = TextBox16.Value
End if
End Sub
2. If the ComboBox1 = "EO" and the OptSI = True then TextBox5 = “”, TextBox10.Value = TextBox18.Value and the TextBox17.Value = ComboBox2.Value tried with the following macro but it failed to automatically set the TextBox10. Value = TextBox18.Value or TextBox17.Value
End Sub[/CODE]
Code:
Private Sub OptSI_Click()
If OptSI1 = True or ComboBox1 = "EO" Then
TextBox5.Value = ""
TextBox10.Value = TextBox18.Value
TextBox17.Value = ComboBox2.Value
End if
End Sub
3. Depending on the automatic modification of the data in the TextBox14 (TDL), TextBox15 (CDD - AT) TextBox17 (TDD) and TextBox10 (CEO) in accordance with the previous macros, it requires that clicking on the CommandButton5 (Save) automatically modifies and saves the information coming from the TextBoxes in the Columns TDL, CDD – AT, TDD and CEO of Listbox1 and consequently in the Columns “AQ” (TDL), “AS” (CDD – AT), “AT” ( TDD) and “AV” (CEO) from Sheet3 (MATRIZ ), tried the following macro, but it tells me that “Error “91” has occurred at run time: Object or block variable not set” as shown. shown in Image2:
Code:
'Edición de ListBox1/MATRIZ
Dim Fila As Range
Dim Linea As String
Dim ValorBuscado As Double
ValorBuscado = Me.TextBox6
Set Fila = Sheets("MATRIZ").Range("B:B").Find(ValorBuscado, Lookat:=xlWhole)
Linea = Fila.Row
Range("AQ" & Linea).Value = Me.TextBox14.Value
Range("AS" & Linea).Value = Me.TextBox15.Value
Range("AT" & Linea).Value = Me.TextBox17.Value
Range("AV" & Linea).Value = Me.TextBox10.Value
Attachments
Last edited: