View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Variable Name Changes in Loop Operation

You can fine tune that as follows...


Dim sDates, vaDates, i As Integer
For i = 0 To 14 Step 7: sDates = sDates & "|" & Date + i: Next 'i

vaDates = Split(Mid$(sDates, 2), "|")
For i = LBound(vaDates) To UBound(vaDates)
Debug.Print vaDates(i)
Next 'i


BTW, you can change any part of a defined variable after it's been
defined.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc