Prečo sa vynecháva ten 1. znak ???
Function AddSpaces(pValue As String) As String
Dim xOut As String, CH As String, chU As String, U As String, L As String
U = UCase(pValue)
L = LCase(pValue)
For i = 1 To Len(pValue)
chU = Mid(U, i, 1)
CH = Mid(pValue, i, 1)
If StrComp(chU, Mid(L, i, 1), vbBinaryCompare) <> 0 Then 'iba ak je to písmeno
CH = IIf(CH = chU, " ", vbNullString) & CH 'ak je to veľké písmeno, pridaj medzeru
End If
xOut = xOut & CH
Next i
AddSpaces = xOut
End Functioncitovat