Prefix Character Cell Character Excel VBA (Visual Basic for Applications)

Prefix Character Cell Character Excel VBA (Visual Basic for Applications)

PrefixCharacter

Property returns prefix character of selected cells in a sheet range. To enable or disable prefix character TransitionNavigationKeys boolean property of Application object has to be manipulated before executing PrefixCharacter property. If TransitionNavigationKeys property sets to True then it will return ‘ (apostrophe) character or blank for a text label.

Code example

Sub PrefixChar()
    
    'set Transition Navigation Key on
    Application.TransitionNavigKeys = True
    
    'print prefix char
    Debug.Print Range("A1").PrefixCharacter
    
End Sub

Output

Next >> Print Area in Excel with code example

Leave a Reply

Your email address will not be published.