Thread: spaces
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default spaces

Hi Delmac,

Try something like:

'=============
Public Sub Tester()
Dim iPos As Long
Const sStr As String = "the rainfall is very heavy thi"

iPos = InStrRev(sStr, Space(1))
MsgBox iPos
End Sub
'<<=============



---
Regards,
Norman


"delmac" wrote in message
...
Hi all, how do I find the first space from the right or the last space
from
the left in a string of 30 chars e.g. "the rainfall is very heavy thi"

Thanks as always
--
delmac