﻿Version=6.80
NumberOfForms=1
Form1=frmMain
FormWidth=238
FormHeight=268
IconFile=
NumberOfDesktopIncludes=0
NumberOfDeviceIncludes=0
NumberOfObjects=0
NumberOfModules=0
Sub designer
addform(frmMain,"Main","",220,220,220)@
addbutton(frmmain,btnTrim,130,15,75,23,"Trim",212,208,200,0,0,0,True,True,9)@
addtable(frmmain,Table1,0,60,240,200,"",245,245,245,0,0,0,True,True,9)@
End Sub
@EndOfDesignText@
Sub Globals
	'Declare the global variables here.

End Sub

Sub App_Start
	frmMain.Show
	Table1.AddCol(cString,"Col1",50)
	Table1.AddCol(cString,"Col2",50)
	Table1.AddCol(cString,"Col3",50)
	Table1.AddRow("","","")
	Table1.AddRow("a","","")
	Table1.AddRow("s","","")
	Table1.AddRow("f","k","")
	Table1.AddRow("h","l","y")
	Table1.AddRow("m","g","p")
End Sub

Sub btnTrim_Click
	Dim col, i, j, n
	
	For col=0 To Table1.ColCount-1
		i=0
		n=Table1.RowCount-2
		Do
			If Table1.Cell(Table1.ColName(col),i)="" Then
				For j=i To n
					Table1.Cell(Table1.ColName(col),j)=Table1.Cell(Table1.ColName(col),j+1)
				Next
				Table1.Cell(Table1.ColName(col),j)=""
				n=n-1
			End If
			If Table1.Cell(Table1.ColName(col),i)<>"" Then
				i=i+1
			End If
		Loop Until i>=n
	Next
End Sub

