question on for...next loops

Jerred

New member
Joined
Mar 1, 2005
Messages
1
Programming Experience
Beginner
this code makes a table(looks like a calendar) and then adds numbers in rows and columns. right now it goes from 1 to 42
my question is: is there a way i can make it stop adding at say 31?

dim test as string
test = "<table BORDER CELLSPACING=1 CELLPADDING=7 WIDTH=590><tr><td>S</td><td>M</td><td>T</td><td>W</td><td>T</td><td>F</td><td>S</td></tr>"
dim intcounter as integer
dim intcounter2 as integer
dim i as integer
i = 1

for intcounter = 1 to 6
test = test & "<tr>"

for intcounter2 = 1 to 7
test = test + "<td>" & i & "</td>"
i = i + 1
next

next
lbltable.text = test
 
Top Bottom