```
Option Explicit
Option Base 1
Function HexToBin(sHexBin As String) As String
Dim sHB, i As Integer
sHB = Array( _
Array("0", "0000"), _
Array("1", "0001"), _
Array("2", "0010"), _
Array("3", "0011"), _
Array("4", "0100"), _
Array("5", "0101"), _
Array("6", "0110"), _
Array("7", "0111"), _
Array("8", "1000"), _
Array("9", "1001"), _
Array("A", "1010"), _
Array("B", "1011"), _
Array("C", "1100"), _
Array("D", "1101"), _
Array("E", "1110"), _
Array("F", "1111"))
For i = 1 To 16
sHexBin = Replace(sHexBin, sHB(i)(1), sHB(i)(2), Compare:=vbTextCompare)
Next
If Len(Replace(Replace(sHexBin, "0", ""), "1", "")) <> 0 Then
HexToBin = "Invalid characters"
Else
HexToBin = "'" & sHexBin
End If
End Function
```