G
Guest
Hello:
I get run time error '424' when I run this code. Error occurs at this line
If (Error.Type(A3) = 3) Then
Could this error be fixed?
Is there any way the case of a character in a cell be checked. I want the
code use different formulas depending on the case of the character.
Sub Macro1()
Range("S9") = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Range("S10") = "abcdefghijklmnopqrstuvwxyz"
Range("A1") = "b"
Range("A1").Select
Selection.TextToColumns Destination:=Range("B1"),
DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(1, 1))
If Range("C1").Value = "" Then
Range("A3").Formula = "=DEC2HEX(FINDB(B1,S9,1)+64) "
If (Error.Type(A3) = 3) Then
Range("A3").Formula = "=DEC2HEX(FINDB(B1,S10,1)+96) "
End If
Range("A4") = "20"
Else
Range("A3").Formula = "=DEC2HEX(FINDB(B1,S9,1)+64) "
Range("A4").Formula = "=DEC2HEX(C1)+30"
End If
End Sub
Thanks
Ravi
I get run time error '424' when I run this code. Error occurs at this line
If (Error.Type(A3) = 3) Then
Could this error be fixed?
Is there any way the case of a character in a cell be checked. I want the
code use different formulas depending on the case of the character.
Sub Macro1()
Range("S9") = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
Range("S10") = "abcdefghijklmnopqrstuvwxyz"
Range("A1") = "b"
Range("A1").Select
Selection.TextToColumns Destination:=Range("B1"),
DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(1, 1))
If Range("C1").Value = "" Then
Range("A3").Formula = "=DEC2HEX(FINDB(B1,S9,1)+64) "
If (Error.Type(A3) = 3) Then
Range("A3").Formula = "=DEC2HEX(FINDB(B1,S10,1)+96) "
End If
Range("A4") = "20"
Else
Range("A3").Formula = "=DEC2HEX(FINDB(B1,S9,1)+64) "
Range("A4").Formula = "=DEC2HEX(C1)+30"
End If
End Sub
Thanks
Ravi