All the Special Characters
I had already built a macro to read all the fonts on my PC at work to make examples to prove that our barcode font does not handle some of the characters that are in the middle of part numbers.I built this to build a list of many special characters in place of CharMap.exe. The maximum character I can use is 65536. I know there are some characters in the range of 128,000 but haven't built for them.
Sub SpecialCharSheet()
Dim LastRow As LongPtr
Dim X As LongPtr
Dim Y As LongPtr
Dim UpRan As String
Sheets("Extended").Select
Cells.Select
Selection.ClearContents
UpRan = InputBox("What is the UPPER range of the numbers?", "Upper", 2500)
Cells(1, 1) = "Hex"
Cells(1, 1 + 1) = "Dec"
Cells(1, 1 + 2) = "Char"
LastRow = Range("A65000").End(xlUp).Row
Y = 1
For X = 201 To UpRan
LastRow = Range(Cells(5000, Y).Address).End(xlUp).Row + 1
Cells(LastRow, Y) = Application.Dec2Hex(X)
Cells(LastRow, Y + 1) = X
Cells(LastRow, Y + 2) = ChrW$("&H" & Application.Dec2Hex(X))
If X Mod 100 = 0 Then
If X > 200 Then
Y = Y + 3
Cells(1, Y) = "Hex"
Cells(1, Y + 1) = "Dec"
Cells(1, Y + 2) = "Char"
Cells(1, Y).Select
DoEvents
End If
End If
Next X
End Sub
Did I need this thing, no. Mostly it was to prove to myself that I could write it.
|