How to show number of words (UNDERNEATH the sentence)

D

Dirk Goldgar

Simon Ferguson said:
how do i show something like this?


the cat sat on the mat
1 2 3 4 5 6

Where does the sentence come from? Where do you want to show the
sentence and numbers? Is this a question about Microsoft Access?
 
F

Frits van Soldt

Simon Ferguson said:
how do i show something like this?


the cat sat on the mat
1 2 3 4 5 6
This seems to work:

s = "the cat sat on the mat"
a = Split(s, " ")
s2 = ""
For i = 0 To UBound(a)
s2 = s2 & CStr(i) & String(CInt(Len(a(i)) - (Len(i) - 1)), " ")
Next
Debug.Print s
Debug.Print s2
 
Top