Signature (Visual Basic / VBA)
Public Function SpellPlayingCard( _
ByVal vCard As Variant _
) As Variant
Code Examples
SpellPlayingCard("7C") = "Seven of Clubs"
SpellPlayingCard("AS") = "Ace of Spades"
SpellPlayingCard("10D") = "Ten of Diamonds"
SpellPlayingCard("JA") = "Joker of Aces"
IsNull(SpellPlayingCard("JD")) = True
1 Joker
2..10 Numbered cards 2 through 10
J Jack
Q Queen
K King
A Ace
A Aces
C Clubs
D Diamonds
S Spades
Parameters
| Parameter | Description |
|---|---|
| vCard | String containing a playing card abbreviation such as "7C" or "AS" or "10D" which will be spelled out. Function returns Null if vCard is Null or cannot be fixed up to a String. |
Return Value
Function usually returns Null if the card abbreviation vCard is invalid. Function may have an unpredictable return value if vCard is invalid.
Notes & Version History
| Note | Matches are case-insensitive, so for example, the card abbreviations "7c" and "7C" both refer to the same card, the seven of clubs. |
| Summary | Each card is represented by a two- or three-character string that describes the number of the card and its suite. The card abbreviation is composed of one value from each of the following tables: |
| Card Suites | When Jokers are used, this function and DealPlayingCardDecks only recognize Jokers as belonging to the Aces and Clubs suites. |