Special characters in procedures and variables: MySub§() ¿testSub() CopyrightSub©() Range¤ ...

onidarbe

Board Regular
Joined
Mar 22, 2013
Messages
64
I know we all have our way of naming functions, subs and variables. But why don't we use special characters in the procedure-names?

Like: MyFunctionName§() or MyCopyrightSub©() or even ¿test_MyFunctionName()

It has his advantages!
  • Procedures starting with one can be alphabetical above any other normal procedure-name in the VBE Procedure pull-down list, grouping them out of the way, like for private test_Subs...
  • Makes the names shorter then addin win, rng, fn, sub, wb, num, str, ... because of 1 special character
  • It makes VBA more readable for those that don't see the difference yet between MyVar & CVar, MyFunction & InStr, MyCell & ActiveCell, ...
  • But most of all, because they give less chance that the chosen name are already existing in standard VBA functions, instructions, methods, ...
Note: Using a suffix instead of a prefix makes is easier to select pressing the first letter in the VBE Procedure pull-down list,
and is automatically been added pressing Ctrl+Space as in MyFuncti Ctrl+Space >>> MyFunction§ so no need to search that special key ;)

I found out that among many others these are working as prefix and suffix, on procedure-names and variables: ƒ … † ‡ ™ ¡ ¤ § ° ¶ ¿ × © ® ™
But do these special characters react the same with everyone and could it give any problem :confused: As for example:
™ is listed between other procedures A...Z in VBE Procedure pull-down list
© and ® are not working with Evaluate()
ƒ has an upper and lower case you don't see
€ can only be a suffix​


So I tried them all, making a little program: (remove the remarks to test all)
Code:
[COLOR=#00A000]''' ---------------------------------------- AscII list of characters with Alt+(1...255)  or  in Debug.Print Chr(1...255) ----------------------------------------[/COLOR]
[COLOR=#00A000]''' In the altList "" = ", and pos 247 overwrites next extra added space character and makes blinking cursor located one further!!![/COLOR]
[COLOR=#00A000]'''           |                                   ""                                                                 111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111111122222222222222222222222222222222222222222222222222222222[/COLOR]
[COLOR=#00A000]'''   1...255 |           1111111111222222222233333 33333444444444455555555556666666666777777777788888888889999999999000000000011111111112222222222333333333344444444445555555555666666666677777777778888888888999999999900000000001111111111222222222233333333334444444444555555[/COLOR]
[COLOR=#00A000]'''           |  1234567890123456789012345678901234 56789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345[/COLOR]
Const altList = "??????•???????¤????¶§?????????  !""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~¦ÇüéâäàåçêëèïîìÄÅÉæÆôöòûùÿÖÜ¢£¥PƒáíóúñѪº¿¬¬½¼¡«»¦¦¦¦¦¦¦++¦¦++++++--+-+¦¦++--¦-+----++++++++¦_¦¦¯aßGpSsµtFTOd8fen=±==()÷˜°··vn²¦ "[COLOR=#00A000] 'cursor out of sinc with char 247![/COLOR]
[COLOR=#00A000]'''   chrList =           !""#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ € ‚ƒ„…†‡ˆ‰Š‹Œ Ž  ‘’“”•–— ™š›œ žŸ ¡¢£¤¥¦§¨©ª«¬*®¯°±²³´µ¶·¸¹º»¼½¾¿ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüýþÿ[/COLOR]
[COLOR=#00A000]'''           |                                                                                                      111111111111111111111111111    1                    2       2111 11   111  2222  2 2  1111 1    1111 1       1    1     1  2111 111111111111 1111 12 1111  1[/COLOR]
[COLOR=#00A000]'''Chr=Alt+...|                                 333 33333444444444455555555556666666666777777777788888888889999999999000000000011111111112222222    5                    4       57551522  676  2445  325  6777 6    4442 4       6    5     5  2363 334333334643 6464 44 5652  5[/COLOR]
[COLOR=#00A000]'''           |                                 234 56789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456    9                 7  7       63565771  649  3914  000  7521 8    2368 4       5    3     4  5301 245580671109 4927 86 1309  2[/COLOR]
[COLOR=#00A000]'''----------------------------------------------------------------------------------------------------------------------------------------------------------------[/COLOR]
[COLOR=#00A000]'''Usage: You can run zzzzzzzzz() and copy/paste the Debug.Print from Immediate window to here and test them all.[/COLOR]
[COLOR=#00A000]'''       Are you can only test these that I liked because of there looks and behaviour.[/COLOR]
[COLOR=#00A000]'''       If you find any fault or have any remarks please contact me on  michel(dot)be(a)gmail....[/COLOR]




Function aaaaaaaaa() [COLOR=#00A000]'''02/08/2013, michel(dot)be(a)gmail....[/COLOR]
    listWorking = "[COLOR=#00A000]'working:   "[/COLOR]
    listAsc = "[COLOR=#00A000]'Chr(..):  "[/COLOR]
    listAlt = "[COLOR=#00A000]'Alt+...:  "[/COLOR]
    On Error Resume Next
        For i = 128 To 255 [COLOR=#00A000]'''test all Chr(...)[/COLOR]
            vPrefix = Evaluate(Chr(i) & "fn()")      [COLOR=#00A000]'''call each function-name starting with that special character[/COLOR]
            vSuffix = Evaluate("fn" & Chr(i) & "()") [COLOR=#00A000]'''call each function-name ending with that special character[/COLOR]
            If Not IsError(vPrefix) Or Not IsError(vSuffix) Then [COLOR=#00A000]'''if any call is successful[/COLOR]
                vAlt = InStr(altList, Chr(i)) [COLOR=#00A000]'''get any Alt+... equivalent[/COLOR]
                If vAlt = 0 Then vAlt = "" [COLOR=#00A000]'''no Alt-number found[/COLOR]
                vAlt = Left(vAlt & "   ", 3)
                If Not IsError(vPrefix) And Not IsError(vSuffix) Then [COLOR=#00A000]'''if both are working, add to the list[/COLOR]
                    listWorking = listWorking & Chr(i) & "   "
                    listAsc = listAsc & Right("  " & i, 3) & " "
                    listAlt = listAlt & vAlt & " "
                End If
                If IsError(vPrefix) Or vPrefix <> 1 Then [COLOR=#00A000]'''as prefix not working with Evaluate[/COLOR]
                    vPrefix = "      "
                Else [COLOR=#00A000]'''working as prefix[/COLOR]
                    vPrefix = Chr(i) & "fn() "
                End If
                If IsError(vSuffix) Or vSuffix <> 1 Then [COLOR=#00A000]'''as suffix not working with Evaluate[/COLOR]
                    vSuffix = "      "
                Else [COLOR=#00A000]'''working as suffix[/COLOR]
                    vSuffix = "fn" & Chr(i) & "() "
                End If
                Debug.Print "Chr(" & i & ") Alt+" & vAlt & " " & vPrefix & " " & CStr(vSuffix)
            End If
        Next
    On Error GoTo 0
    Debug.Print listWorking
    Debug.Print listAsc
    Debug.Print listAlt
    Debug.Print
    Debug.Print "Some nice looking and working, except with Evaluate:"
    Debug.Print "Chr(" & Asc("©") & ") Alt+    fn©()=" & fn©()
    Debug.Print "Chr(" & Asc("®") & ") Alt+    fn®()=" & fn®()




    
End Function
Function zzzzzzzzz() [COLOR=#00A000]'''02/08/2013, michel(dot)be(a)gmail....[/COLOR]
    Dim vLoc As Integer
    For i = 128 To 255 [COLOR=#00A000]'''print test function with each special character[/COLOR]
        vAlt = ""
        vLoc = InStr(vLoc + 1, altList, Chr(i))
        Do Until vLoc = 0 [COLOR=#00A000]'''find all Alt+... equivalents[/COLOR]
            If vAlt <> "" Then vAlt = vAlt & ","
            vAlt = vAlt & vLoc  [COLOR=#00A000]''''get the Alt-number[/COLOR]
            vLoc = InStr(vLoc + 1, altList, Chr(i))
        Loop
        If InStr(vDone, LCase(Chr(i))) = 0 Then [COLOR=#00A000]'''skip characters that are already been used in other upper/lower-case[/COLOR]
            If Asc(LCase(Chr(i))) = Asc(UCase(Chr(i))) Then [COLOR=#00A000]'''tempory skip letters aA...zZ and šŠœŒžŽÿŸàÀáÁâÂãÃäÄåÅæÆçÇèÈéÉêÊëËìÌíÍîÎïÏðÐñÑòÒóÓôÔõÕöÖøØùÙúÚûÛüÜýÝþÞ[/COLOR]
                Debug.Print Replace("Function _fn():_var = 1:var_=_var:_fn = var_:End Function[COLOR=#00A000]'=Chr(", "_", Chr(i)) & Trim(i) & ") =Alt+" & vAlt '''prefix[/COLOR]
                Debug.Print Replace("Function fn_():_var = 1:var_=_var:fn_ = var_:End Function[COLOR=#00A000]'=Chr(", "_", Chr(i)) & Trim(i) & ") =Alt+" & vAlt '''suffix[/COLOR]
            Else
                [COLOR=#00A000]'Debug.Print LCase(Chr(i)) & UCase(Chr(i));[/COLOR]
            End If
            vDone = vDone & LCase(Chr(i))
        End If
    Next
    [COLOR=#00A000]'''output if copied following this function... (I did turn off those I don't want, to view th VBE Procedure pull-down list)[/COLOR]
End Function
[COLOR=#00A000]'Function €fn(): €var = 1: var€ = €var: €fn = var€: End Function '=Chr(128) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn€(): €var = 1: var€ = €var: fn€ = var€: End Function '=Chr(128) =Alt+[/COLOR]
[COLOR=#00A000]'Function �fn(): �var = 1: var� = �var: �fn = var�: End Function '=Chr(129) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn�(): �var = 1: var� = �var: fn� = var�: End Function '=Chr(129) =Alt+[/COLOR]
[COLOR=#00A000]'Function ‚fn(): ‚var = 1: var‚ = ‚var: ‚fn = var‚: End Function '=Chr(130) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn‚(): ‚var = 1: var‚ = ‚var: fn‚ = var‚: End Function '=Chr(130) =Alt+[/COLOR]
[COLOR=#00A000]'Function ƒfn(): ƒvar = 1: varƒ = ƒvar: ƒfn = varƒ: End Function '=Chr(131) =Alt+159[/COLOR]
[COLOR=#00A000]'Function fnƒ(): ƒvar = 1: varƒ = ƒvar: fnƒ = varƒ: End Function '=Chr(131) =Alt+159[/COLOR]
[COLOR=#00A000]'Function „fn(): „var = 1: var„ = „var: „fn = var„: End Function '=Chr(132) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn„(): „var = 1: var„ = „var: fn„ = var„: End Function '=Chr(132) =Alt+[/COLOR]
Function …fn(): …var = 1: var… = …var: …fn = var…: End Function [COLOR=#00A000]'=Chr(133) =Alt+[/COLOR]
Function fn…(): …var = 1: var… = …var: fn… = var…: End Function [COLOR=#00A000]'=Chr(133) =Alt+[/COLOR]
Function †fn(): †var = 1: var† = †var: †fn = var†: End Function [COLOR=#00A000]'=Chr(134) =Alt+[/COLOR]
Function fn†(): †var = 1: var† = †var: fn† = var†: End Function [COLOR=#00A000]'=Chr(134) =Alt+[/COLOR]
Function ‡fn(): ‡var = 1: var‡ = ‡var: ‡fn = var‡: End Function [COLOR=#00A000]'=Chr(135) =Alt+[/COLOR]
Function fn‡(): ‡var = 1: var‡ = ‡var: fn‡ = var‡: End Function [COLOR=#00A000]'=Chr(135) =Alt+[/COLOR]
[COLOR=#00A000]'Function ˆfn(): ˆvar = 1: varˆ = ˆvar: ˆfn = varˆ: End Function '=Chr(136) =Alt+[/COLOR]
[COLOR=#00A000]'Function fnˆ(): ˆvar = 1: varˆ = ˆvar: fnˆ = varˆ: End Function '=Chr(136) =Alt+[/COLOR]
[COLOR=#00A000]'Function ‰fn(): ‰var = 1: var‰ = ‰var: ‰fn = var‰: End Function '=Chr(137) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn‰(): ‰var = 1: var‰ = ‰var: fn‰ = var‰: End Function '=Chr(137) =Alt+[/COLOR]
[COLOR=#00A000]'Function ‹fn(): ‹var = 1: var‹ = ‹var: ‹fn = var‹: End Function '=Chr(139) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn‹(): ‹var = 1: var‹ = ‹var: fn‹ = var‹: End Function '=Chr(139) =Alt+[/COLOR]
[COLOR=#00A000]'Function �fn(): �var = 1: var� = �var: �fn = var�: End Function '=Chr(141) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn�(): �var = 1: var� = �var: fn� = var�: End Function '=Chr(141) =Alt+[/COLOR]
[COLOR=#00A000]'Function �fn(): �var = 1: var� = �var: �fn = var�: End Function '=Chr(143) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn�(): �var = 1: var� = �var: fn� = var�: End Function '=Chr(143) =Alt+[/COLOR]
[COLOR=#00A000]'Function �fn(): �var = 1: var� = �var: �fn = var�: End Function '=Chr(144) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn�(): �var = 1: var� = �var: fn� = var�: End Function '=Chr(144) =Alt+[/COLOR]
[COLOR=#00A000]'Function ‘fn(): ‘var = 1: var‘ = ‘var: ‘fn = var‘: End Function '=Chr(145) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn‘(): ‘var = 1: var‘ = ‘var: fn‘ = var‘: End Function '=Chr(145) =Alt+[/COLOR]
[COLOR=#00A000]'Function ’fn(): ’var = 1: var’ = ’var: ’fn = var’: End Function '=Chr(146) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn’(): ’var = 1: var’ = ’var: fn’ = var’: End Function '=Chr(146) =Alt+[/COLOR]
[COLOR=#00A000]'Function “fn(): “var = 1: var“ = “var: “fn = var“: End Function '=Chr(147) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn“(): “var = 1: var“ = “var: fn“ = var“: End Function '=Chr(147) =Alt+[/COLOR]
[COLOR=#00A000]'Function ”fn(): ”var = 1: var” = ”var: ”fn = var”: End Function '=Chr(148) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn”(): ”var = 1: var” = ”var: fn” = var”: End Function '=Chr(148) =Alt+[/COLOR]
Function •fn(): •var = 1: var• = •var: •fn = var•: End Function [COLOR=#00A000]'=Chr(149) =Alt+7[/COLOR]
Function fn•(): •var = 1: var• = •var: fn• = var•: End Function [COLOR=#00A000]'=Chr(149) =Alt+7[/COLOR]
[COLOR=#00A000]'Function –fn(): –var = 1: var– = –var: –fn = var–: End Function '=Chr(150) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn–(): –var = 1: var– = –var: fn– = var–: End Function '=Chr(150) =Alt+[/COLOR]
[COLOR=#00A000]'Function —fn(): —var = 1: var— = —var: —fn = var—: End Function '=Chr(151) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn—(): —var = 1: var— = —var: fn— = var—: End Function '=Chr(151) =Alt+[/COLOR]
[COLOR=#00A000]'Function ˜fn(): ˜var = 1: var˜ = ˜var: ˜fn = var˜: End Function '=Chr(152) =Alt+247[/COLOR]
[COLOR=#00A000]'Function fn˜(): ˜var = 1: var˜ = ˜var: fn˜ = var˜: End Function '=Chr(152) =Alt+247[/COLOR]
Function ™fn(): ™var = 1: var™ = ™var: ™fn = var™: End Function [COLOR=#00A000]'=Chr(153) =Alt+[/COLOR]
Function fn™(): ™var = 1: var™ = ™var: fn™ = var™: End Function [COLOR=#00A000]'=Chr(153) =Alt+[/COLOR]
[COLOR=#00A000]'Function ›fn(): ›var = 1: var› = ›var: ›fn = var›: End Function '=Chr(155) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn›(): ›var = 1: var› = ›var: fn› = var›: End Function '=Chr(155) =Alt+[/COLOR]
[COLOR=#00A000]'Function �fn(): �var = 1: var� = �var: �fn = var�: End Function '=Chr(157) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn�(): �var = 1: var� = �var: fn� = var�: End Function '=Chr(157) =Alt+[/COLOR]
[COLOR=#00A000]'Function  fn():  var = 1: var  =  var:  fn = var : End Function '=Chr(160) =Alt+255[/COLOR]
[COLOR=#00A000]'Function fn ():  var = 1: var  =  var: fn  = var : End Function '=Chr(160) =Alt+255[/COLOR]
Function ¡fn(): ¡var = 1: var¡ = ¡var: ¡fn = var¡: End Function [COLOR=#00A000]'=Chr(161) =Alt+173[/COLOR]
Function fn¡(): ¡var = 1: var¡ = ¡var: fn¡ = var¡: End Function [COLOR=#00A000]'=Chr(161) =Alt+173[/COLOR]
[COLOR=#00A000]'Function ¢fn(): ¢var = 1: var¢ = ¢var: ¢fn = var¢: End Function '=Chr(162) =Alt+155[/COLOR]
[COLOR=#00A000]'Function fn¢(): ¢var = 1: var¢ = ¢var: fn¢ = var¢: End Function '=Chr(162) =Alt+155[/COLOR]
[COLOR=#00A000]'Function £fn(): £var = 1: var£ = £var: £fn = var£: End Function '=Chr(163) =Alt+156[/COLOR]
[COLOR=#00A000]'Function fn£(): £var = 1: var£ = £var: fn£ = var£: End Function '=Chr(163) =Alt+156[/COLOR]
[COLOR=#00A000]'Function ¤fn(): ¤var = 1: var¤ = ¤var: ¤fn = var¤: End Function '=Chr(164) =Alt+15[/COLOR]
[COLOR=#00A000]'Function fn¤(): ¤var = 1: var¤ = ¤var: fn¤ = var¤: End Function '=Chr(164) =Alt+15[/COLOR]
Function ¥fn(): ¥var = 1: var¥ = ¥var: ¥fn = var¥: End Function [COLOR=#00A000]'=Chr(165) =Alt+157[/COLOR]
Function fn¥(): ¥var = 1: var¥ = ¥var: fn¥ = var¥: End Function [COLOR=#00A000]'=Chr(165) =Alt+157[/COLOR]
Function ¦fn(): ¦var = 1: var¦ = ¦var: ¦fn = var¦: End Function [COLOR=#00A000]'=Chr(166) =Alt+127,176,177,178,179,180,181,182,185,186,198,199,204,219,221,222,254[/COLOR]
Function fn¦(): ¦var = 1: var¦ = ¦var: fn¦ = var¦: End Function [COLOR=#00A000]'=Chr(166) =Alt+127,176,177,178,179,180,181,182,185,186,198,199,204,219,221,222,254[/COLOR]
Function §fn(): §var = 1: var§ = §var: §fn = var§: End Function [COLOR=#00A000]'=Chr(167) =Alt+21[/COLOR]
Function fn§(): §var = 1: var§ = §var: fn§ = var§: End Function [COLOR=#00A000]'=Chr(167) =Alt+21[/COLOR]
[COLOR=#00A000]'Function ¨fn(): ¨var = 1: var¨ = ¨var: ¨fn = var¨: End Function '=Chr(168) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn¨(): ¨var = 1: var¨ = ¨var: fn¨ = var¨: End Function '=Chr(168) =Alt+[/COLOR]
Function ©fn(): ©var = 1: var© = ©var: ©fn = var©: End Function [COLOR=#00A000]'=Chr(169) =Alt+[/COLOR]
Function fn©(): ©var = 1: var© = ©var: fn© = var©: End Function [COLOR=#00A000]'=Chr(169) =Alt+[/COLOR]
[COLOR=#00A000]'Function ªfn(): ªvar = 1: varª = ªvar: ªfn = varª: End Function '=Chr(170) =Alt+166[/COLOR]
[COLOR=#00A000]'Function fnª(): ªvar = 1: varª = ªvar: fnª = varª: End Function '=Chr(170) =Alt+166[/COLOR]
Function «fn(): «var = 1: var« = «var: «fn = var«: End Function [COLOR=#00A000]'=Chr(171) =Alt+174[/COLOR]
Function fn«(): «var = 1: var« = «var: fn« = var«: End Function [COLOR=#00A000]'=Chr(171) =Alt+174[/COLOR]
[COLOR=#00A000]'Function ¬fn(): ¬var = 1: var¬ = ¬var: ¬fn = var¬: End Function '=Chr(172) =Alt+169,170[/COLOR]
[COLOR=#00A000]'Function fn¬(): ¬var = 1: var¬ = ¬var: fn¬ = var¬: End Function '=Chr(172) =Alt+169,170[/COLOR]
[COLOR=#00A000]'Function *fn(): *var = 1: var* = *var: *fn = var*: End Function '=Chr(173) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn*(): *var = 1: var* = *var: fn* = var*: End Function '=Chr(173) =Alt+[/COLOR]
Function ®fn(): ®var = 1: var® = ®var: ®fn = var®: End Function [COLOR=#00A000]'=Chr(174) =Alt+[/COLOR]
Function fn®(): ®var = 1: var® = ®var: fn® = var®: End Function [COLOR=#00A000]'=Chr(174) =Alt+[/COLOR]
Function ¯fn(): ¯var = 1: var¯ = ¯var: ¯fn = var¯: End Function [COLOR=#00A000]'=Chr(175) =Alt+223[/COLOR]
Function fn¯(): ¯var = 1: var¯ = ¯var: fn¯ = var¯: End Function [COLOR=#00A000]'=Chr(175) =Alt+223[/COLOR]
Function °fn(): °var = 1: var° = °var: °fn = var°: End Function [COLOR=#00A000]'=Chr(176) =Alt+248[/COLOR]
Function fn°(): °var = 1: var° = °var: fn° = var°: End Function [COLOR=#00A000]'=Chr(176) =Alt+248[/COLOR]
[COLOR=#00A000]'Function ±fn(): ±var = 1: var± = ±var: ±fn = var±: End Function '=Chr(177) =Alt+241[/COLOR]
[COLOR=#00A000]'Function fn±(): ±var = 1: var± = ±var: fn± = var±: End Function '=Chr(177) =Alt+241[/COLOR]
[COLOR=#00A000]'Function ²fn(): ²var = 1: var² = ²var: ²fn = var²: End Function '=Chr(178) =Alt+253[/COLOR]
[COLOR=#00A000]'Function fn²(): ²var = 1: var² = ²var: fn² = var²: End Function '=Chr(178) =Alt+253[/COLOR]
[COLOR=#00A000]'Function ³fn(): ³var = 1: var³ = ³var: ³fn = var³: End Function '=Chr(179) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn³(): ³var = 1: var³ = ³var: fn³ = var³: End Function '=Chr(179) =Alt+[/COLOR]
[COLOR=#00A000]'Function ´fn(): ´var = 1: var´ = ´var: ´fn = var´: End Function '=Chr(180) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn´(): ´var = 1: var´ = ´var: fn´ = var´: End Function '=Chr(180) =Alt+[/COLOR]
[COLOR=#00A000]'Function µfn(): µvar = 1: varµ = µvar: µfn = varµ: End Function '=Chr(181) =Alt+230[/COLOR]
[COLOR=#00A000]'Function fnµ(): µvar = 1: varµ = µvar: fnµ = varµ: End Function '=Chr(181) =Alt+230[/COLOR]
Function ¶fn(): ¶var = 1: var¶ = ¶var: ¶fn = var¶: End Function [COLOR=#00A000]'=Chr(182) =Alt+20[/COLOR]
Function fn¶(): ¶var = 1: var¶ = ¶var: fn¶ = var¶: End Function [COLOR=#00A000]'=Chr(182) =Alt+20[/COLOR]
[COLOR=#00A000]'Function ·fn(): ·var = 1: var· = ·var: ·fn = var·: End Function '=Chr(183) =Alt+249,250[/COLOR]
[COLOR=#00A000]'Function fn·(): ·var = 1: var· = ·var: fn· = var·: End Function '=Chr(183) =Alt+249,250[/COLOR]
[COLOR=#00A000]'Function ¸fn(): ¸var = 1: var¸ = ¸var: ¸fn = var¸: End Function '=Chr(184) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn¸(): ¸var = 1: var¸ = ¸var: fn¸ = var¸: End Function '=Chr(184) =Alt+[/COLOR]
[COLOR=#00A000]'Function ¹fn(): ¹var = 1: var¹ = ¹var: ¹fn = var¹: End Function '=Chr(185) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn¹(): ¹var = 1: var¹ = ¹var: fn¹ = var¹: End Function '=Chr(185) =Alt+[/COLOR]
[COLOR=#00A000]'Function ºfn(): ºvar = 1: varº = ºvar: ºfn = varº: End Function '=Chr(186) =Alt+167[/COLOR]
[COLOR=#00A000]'Function fnº(): ºvar = 1: varº = ºvar: fnº = varº: End Function '=Chr(186) =Alt+167[/COLOR]
Function »fn(): »var = 1: var» = »var: »fn = var»: End Function [COLOR=#00A000]'=Chr(187) =Alt+175[/COLOR]
Function fn»(): »var = 1: var» = »var: fn» = var»: End Function [COLOR=#00A000]'=Chr(187) =Alt+175[/COLOR]
[COLOR=#00A000]'Function ¼fn(): ¼var = 1: var¼ = ¼var: ¼fn = var¼: End Function '=Chr(188) =Alt+172[/COLOR]
[COLOR=#00A000]'Function fn¼(): ¼var = 1: var¼ = ¼var: fn¼ = var¼: End Function '=Chr(188) =Alt+172[/COLOR]
[COLOR=#00A000]'Function ½fn(): ½var = 1: var½ = ½var: ½fn = var½: End Function '=Chr(189) =Alt+171[/COLOR]
[COLOR=#00A000]'Function fn½(): ½var = 1: var½ = ½var: fn½ = var½: End Function '=Chr(189) =Alt+171[/COLOR]
[COLOR=#00A000]'Function ¾fn(): ¾var = 1: var¾ = ¾var: ¾fn = var¾: End Function '=Chr(190) =Alt+[/COLOR]
[COLOR=#00A000]'Function fn¾(): ¾var = 1: var¾ = ¾var: fn¾ = var¾: End Function '=Chr(190) =Alt+[/COLOR]
Function ¿fn(): ¿var = 1: var¿ = ¿var: ¿fn = var¿: End Function [COLOR=#00A000]'=Chr(191) =Alt+168[/COLOR]
Function fn¿(): ¿var = 1: var¿ = ¿var: fn¿ = var¿: End Function [COLOR=#00A000]'=Chr(191) =Alt+168[/COLOR]
Function ×fn(): ×var = 1: var× = ×var: ×fn = var×: End Function [COLOR=#00A000]'=Chr(215) =Alt+[/COLOR]
Function fn×(): ×var = 1: var× = ×var: fn× = var×: End Function [COLOR=#00A000]'=Chr(215) =Alt+[/COLOR]
[COLOR=#00A000]'Function ßfn(): ßvar = 1: varß = ßvar: ßfn = varß: End Function '=Chr(223) =Alt+225[/COLOR]
[COLOR=#00A000]'Function fnß(): ßvar = 1: varß = ßvar: fnß = varß: End Function '=Chr(223) =Alt+225[/COLOR]
[COLOR=#00A000]'Function ÷fn(): ÷var = 1: var÷ = ÷var: ÷fn = var÷: End Function '=Chr(247) =Alt+246[/COLOR]
[COLOR=#00A000]'Function fn÷(): ÷var = 1: var÷ = ÷var: fn÷ = var÷: End Function '=Chr(247) =Alt+246[/COLOR]




[COLOR=#00A000]'working:   ƒ   …   †   ‡   ‰   ‘   ’   “   ”   –   —   ™   ¡   ¤   §   ¨   ª   *   ¯   °   ±   ²   ³   ´   µ   ¶   ·   ¸   ¹   º   ¼   ½   ¾   ¿   ×   ß   ÷[/COLOR]
[COLOR=#00A000]'Chr(..):  131 133 134 135 137 145 146 147 148 150 151 153 161 164 167 168 170 173 175 176 177 178 179 180 181 182 183 184 185 186 188 189 190 191 215 223 247[/COLOR]
[COLOR=#00A000]'Alt+...:  159                                             173 15  21      166     223 248 241 253         230 20  249         167 172 171     168     225 246[/COLOR]
[COLOR=#00A000]'Keyboard:                                                         key                 key     key key key key[/COLOR]
[COLOR=#00A000]'list top:      …   †   ‡   ‰   ‘           ”                       §   ¨           ¯   °   ±   ²   ³   ´   µ   ¶   ·   ¸           ¼   ½   ¾   ¿   ×       ÷[/COLOR]
[COLOR=#00A000]'nice look: ƒ   …   †   ‡                               ™   ¡   ¤   §                   °                       ¶                               ¿   ×[/COLOR]
[COLOR=#00A000]'NOTE: result on Excel 14.0(6126) 2010-64bit azerty.be 02/08/2013, michel(dot)be(a)gmail....[/COLOR]




[COLOR=#00A000]'''              ------------------------------------------------- C O N C L U S I O N -------------------------------------------------[/COLOR]
[COLOR=#00A000]''' Some characters that don't have Alt-number or keyboard-key-combo can only be copy/paste from Debug.Print Chr(...)[/COLOR]
[COLOR=#00A000]''' Some are alphabetical above a-z procedure-name in VBE Procedure pull-down list: … † ‡ ‰ ‘ ” § ¨ ¯ ° ± ² ³ ´ µ ¶ · ¸ ¼ ½ ¾ ¿ × ÷[/COLOR]
[COLOR=#00A000]'''[/COLOR]
[COLOR=#00A000]''' NOT TO BE USED IN PROCEDURE NAMES, BUT REMARKABLE CHARACTERS:[/COLOR]
[COLOR=#00A000]''' Alt+255/Chr(160) = look-alike-space <> space, so will not be a Split() default delimiter.[/COLOR]
[COLOR=#00A000]''' !!! ˜ =Alt+247/Chr(152) moves cursor back overwriting his own tilde, moves the blinking line one further, try edit this line ;) !!![/COLOR]
[COLOR=#00A000]''' !!!  =Chr(...) 129, 141, 143, 144, 157 invisible and not the same! no Alt+ & cursor also out of sinc !!![/COLOR]
[COLOR=#00A000]'''[/COLOR]
[COLOR=#00A000]''' There are more working characters, but they just don't work with Evaluate, only direct calls, like these nice ones: ©=Chr(169), ®=Chr(174)[/COLOR]
[COLOR=#00A000]'''[/COLOR]
[COLOR=#00A000]''' I'm going to use § as in MySub§() & MyFunction§() because it's on my keyboard. Those that havent got it can use Ctrl-Space to call my procedures.[/COLOR]
[COLOR=#00A000]''' I can use private ¿MySub() as a test and explication sub to the actual subs. This way they are grouped at the top in VBE Procedure pull-down list.[/COLOR]
[COLOR=#00A000]'''[/COLOR]
[COLOR=#00A000]'''              ------------------------------------------------------------------------------------------------------------------------[/COLOR]
Made also a short version to test my selected special characters.
Maybe some of you can test if it is also working the same on other systems, excel-versions, keyboards and countries.... Thanks!
Code:
Function test()
    On Error Resume Next
        For i = 128 To 255 
            vPrefix = Evaluate(Chr(i) & "fn()")      
            vSuffix = Evaluate("fn" & Chr(i) & "()") 
            If Not IsError(vPrefix) Or Not IsError(vSuffix) Then 
                If IsError(vPrefix) Or vPrefix <> 1 Then 
                    vPrefix = "      "
                Else 
                    vPrefix = Chr(i) & "fn() "
                End If
                If IsError(vSuffix) Or vSuffix <> 1 Then 
                    vSuffix = "      "
                Else 
                    vSuffix = "fn" & Chr(i) & "() "
                End If
                Debug.Print "Chr(" & i & ")  " & vPrefix & " " & CStr(vSuffix)
            End If
        Next
        
        Debug.Print "Chr(149) •fn() = " & •fn()
        Debug.Print "Chr(149) fn•() = " & fn•()
        Debug.Print "Chr(165) ¥fn() = " & ¥fn()
        Debug.Print "Chr(165) fn¥() = " & fn¥()
        Debug.Print "Chr(166) ¦fn() = " & ¦fn()
        Debug.Print "Chr(166) fn¦() = " & fn¦()
        Debug.Print "Chr(169) ©fn() = " & ©fn()
        Debug.Print "Chr(169) fn©() = " & fn©()
        Debug.Print "Chr(171) «fn() = " & «fn()
        Debug.Print "Chr(171) fn«() = " & fn«()
        Debug.Print "Chr(174) ®fn() = " & ®fn()
        Debug.Print "Chr(174) fn®() = " & fn®()
        Debug.Print "Chr(187) »fn() = " & »fn()
        Debug.Print "Chr(187) fn»() = " & fn»()
    On Error GoTo 0
End Function



Function €fn(): €var = 1: var€ = €var: €fn = var€: End Function 
Function fn€(): €var = 1: var€ = €var: fn€ = var€: End Function 



Function …fn(): …var = 1: var… = …var: …fn = var…: End Function 
Function fn…(): …var = 1: var… = …var: fn… = var…: End Function 
Function †fn(): †var = 1: var† = †var: †fn = var†: End Function 
Function fn†(): †var = 1: var† = †var: fn† = var†: End Function 
Function ‡fn(): ‡var = 1: var‡ = ‡var: ‡fn = var‡: End Function 
Function fn‡(): ‡var = 1: var‡ = ‡var: fn‡ = var‡: End Function 
Function ™fn(): ™var = 1: var™ = ™var: ™fn = var™: End Function 
Function fn™(): ™var = 1: var™ = ™var: fn™ = var™: End Function 
Function ¡fn(): ¡var = 1: var¡ = ¡var: ¡fn = var¡: End Function 
Function fn¡(): ¡var = 1: var¡ = ¡var: fn¡ = var¡: End Function 
Function §fn(): §var = 1: var§ = §var: §fn = var§: End Function 
Function fn§(): §var = 1: var§ = §var: fn§ = var§: End Function 
Function ¯fn(): ¯var = 1: var¯ = ¯var: ¯fn = var¯: End Function 
Function fn¯(): ¯var = 1: var¯ = ¯var: fn¯ = var¯: End Function 
Function °fn(): °var = 1: var° = °var: °fn = var°: End Function 
Function fn°(): °var = 1: var° = °var: fn° = var°: End Function 
Function ¶fn(): ¶var = 1: var¶ = ¶var: ¶fn = var¶: End Function 
Function fn¶(): ¶var = 1: var¶ = ¶var: fn¶ = var¶: End Function 
Function ¿fn(): ¿var = 1: var¿ = ¿var: ¿fn = var¿: End Function 
Function fn¿(): ¿var = 1: var¿ = ¿var: fn¿ = var¿: End Function 
Function ×fn(): ×var = 1: var× = ×var: ×fn = var×: End Function 
Function fn×(): ×var = 1: var× = ×var: fn× = var×: End Function 



Function •fn(): •var = 1: var• = •var: •fn = var•: End Function 
Function fn•(): •var = 1: var• = •var: fn• = var•: End Function 
Function ¥fn(): ¥var = 1: var¥ = ¥var: ¥fn = var¥: End Function 
Function fn¥(): ¥var = 1: var¥ = ¥var: fn¥ = var¥: End Function 
Function ¦fn(): ¦var = 1: var¦ = ¦var: ¦fn = var¦: End Function 
Function fn¦(): ¦var = 1: var¦ = ¦var: fn¦ = var¦: End Function 
Function ©fn(): ©var = 1: var© = ©var: ©fn = var©: End Function 
Function fn©(): ©var = 1: var© = ©var: fn© = var©: End Function 
Function «fn(): «var = 1: var« = «var: «fn = var«: End Function 
Function fn«(): «var = 1: var« = «var: fn« = var«: End Function 
Function ®fn(): ®var = 1: var® = ®var: ®fn = var®: End Function 
Function fn®(): ®var = 1: var® = ®var: fn® = var®: End Function 
Function »fn(): »var = 1: var» = »var: »fn = var»: End Function 
Function fn»(): »var = 1: var» = »var: fn» = var»: End Function
output on my machine :
Code:
Chr(128)         fn€() 
Chr(133)  …fn()  fn…() 
Chr(134)  †fn()  fn†() 
Chr(135)  ‡fn()  fn‡() 
Chr(153)  ™fn()  fn™() 
Chr(161)  ¡fn()  fn¡() 
Chr(167)  §fn()  fn§() 
Chr(175)  ¯fn()  fn¯() 
Chr(176)  °fn()  fn°() 
Chr(182)  ¶fn()  fn¶() 
Chr(191)  ¿fn()  fn¿() 
Chr(215)  ×fn()  fn×() 
Chr(149) •fn() = 1
Chr(149) fn•() = 1
Chr(165) ¥fn() = 1
Chr(165) fn¥() = 1
Chr(166) ¦fn() = 1
Chr(166) fn¦() = 1
Chr(169) ©fn() = 1
Chr(169) fn©() = 1
Chr(171) «fn() = 1
Chr(171) fn«() = 1
Chr(174) ®fn() = 1
Chr(174) fn®() = 1
Chr(187) »fn() = 1
Chr(187) fn»() = 1
 

Forum statistics

Threads
1,081,545
Messages
5,359,438
Members
400,528
Latest member
Ratish52

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...
Top