View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Right justify a string

Try...

Dim s2$, vS1, n%
vS1 = Split("0000| |--------", "|")
s2 = "13"
For n = LBound(vS1) To UBound(vS1)
Debug.Print Left$(vS1(n), Len(vS1(n)) - Len(s2)) + s2
Next

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion