How to show number of words (UNDERNEATH the sentence)

  • Thread starter Thread starter Simon Ferguson
  • Start date Start date
S

Simon Ferguson

how do i show something like this?


the cat sat on the mat
1 2 3 4 5 6
 
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?
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top