convertir decimal a hexadecimal
bonjours a tous, j'ai un petit probleme...je voudrais savoir si c'est possible d'ajouter des espaces....
Example:
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
| 'SiteID1
meh = siteidz.Text
bleh = Hex(Val(meh))
If Len(bleh) = "3" Then
bleh = "0" & bleh
lft = Left(bleh, 2)
rgt = Right(bleh, Len(bleh) - 2)
bleh = lft & " " & rgt
siteid = bleh
Pos = 1
While Pos <= Len(siteid)
CurChar = Mid(siteid, Pos, 2)
If siteid = "" Then
SiteID2 = Chr(CLng("&H" & CurChar))
Else
SiteID2 = SiteID2 & Chr(CLng("&H" & CurChar))
End If
Pos = Pos + 3
Wend |
ce code marche tres bien (pour les petite conversions) mais comment pourrais-je ajouter plus q'un n'espace dans une plus grosse conversion??
ou simplement ajouter un espace tous les 2 chiffres
merci d'avance.