What i am trying to do is count through a list of files in a dirctory and display them in a page. I can get that basic part done just fine. But i am trying to adjust the display so that it creates a table that is four cells wide and repeats the rows of cells untill all the files are displayed. The problem i am having, soon as i try to put a counter in so that it writed a row with 4 cells and then repeats, its not grabbing all the files from the directory and showing them. For exampe if i only have 5 files it shows 4, if i have 9 files it shows 8, if i have 12 files it show 10.<BR><BR>Below is the code i am using. I have tried loops for the counter as well but come up with the same result. As you see im using a For loop to count through the collection of files, and an if statement with a counter to control the number of cells per row and repeating till all the files are written into the page.<BR><BR><BR>For Each ssfile in foldercontents<BR>If counter &#060;&#062; 4 Then<BR>Response.Write "&#060;td&#062;"<BR>Response.Write "&#060;img src=&#039;" & folder & "\" & ssfile.Name & "&#039;&#062;"<BR>Response.Write "&#060;/td&#062;" &VbCrLf<BR>counter=counter+1<BR>Else<BR>Response.W rite "&#060;/tr&#062;" &VbCrLf<BR>Response.Write "&#060;tr&#062;" &VbCrLf<BR>counter=0<BR>End If<BR>Next