Ya está revisado, la macro correcta es esta:
Ahora funciona correctamente: (el condicional del and tiene que ser el primero)
Private Sub CommandButton1_Click()
If InStr(TextBox1, "/") And InStr(TextBox2, "/") Then
parte1txt1 = Left(TextBox1, Application.WorksheetFunction.Search("/", TextBox1) - 1)
parte2txt1 = Right(TextBox1, Len(TextBox1) - Application.WorksheetFunction.Search("/", TextBox1))
valor1 = parte1txt1 / parte2txt1
parte1txt2 = Left(TextBox2, Application.WorksheetFunction.Search("/", TextBox2) - 1)
parte2txt2 = Right(TextBox2, Len(TextBox2) - Application.WorksheetFunction.Search("/", TextBox2))
valor2 = parte1txt2 / parte2txt2
TextBox3.Value = CDbl(valor1) * CDbl(valor2)
Exit Sub
End If
If InStr(TextBox1, "/") Then
parte1txt1 = Left(TextBox1, Application.WorksheetFunction.Search("/", TextBox1) - 1)
parte2txt1 = Right(TextBox1, Len(TextBox1) - Application.WorksheetFunction.Search("/", TextBox1))
valor1 = parte1txt1 / parte2txt1
TextBox3.Value = CDbl(valor1) * CDbl(TextBox2)
Exit Sub
End If
If InStr(TextBox2, "/") Then
parte1txt2 = Left(TextBox2, Application.WorksheetFunction.Search("/", TextBox2) - 1)
parte2txt2 = Right(TextBox2, Len(TextBox2) - Application.WorksheetFunction.Search("/", TextBox2))
valor2 = parte1txt2 / parte2txt2
TextBox3.Value = CDbl(TextBox1) * CDbl(valor2)
Exit Sub
End If
TextBox3.Value = CDbl(TextBox1) * CDbl(TextBox2)
End Sub
te mando un saludo, y recuerda finalizar la consulta