Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
LiCal used his keyboard to write :
You could use a For...Next loop and use the counter like so... * Dim i As Integer * For i = 1 To 3 * * MsgBox "Day_" & CStr(i) * Next 'i I was trying to get the msgbox to show the Date not "Day_1" etc. Ok, put the dates in an array and loop the array... Dim sDates, vaDates, i As Integer For i = 0 To 14 Step 7 sDates = sDates & "|" & Date + i Next 'i sDates = Mid$(sDates, 2) vaDates = Split(sDates, "|") For i = LBound(vaDates) To UBound(vaDates) Debug.Print vaDates(i) Next 'i -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Loop with variable name? | Excel Discussion (Misc queries) | |||
Loop with Variable name? | Excel Programming | |||
loop for-next with variable end | Excel Programming | |||
Change cut/paste operation to cut/insert operation | Excel Programming | |||
For Each ... Next loop - need to reference the loop variable | Excel Programming |