for ll_row = 1 to Integer(this.Describe("DataWindow.Column.Count"))
ls_cname = this.Describe("#" + String(ll_row) + ".Name")
if this.Describe(ls_cname + ".Visible") <> "0" then
// Get first and last column
if this.Describe(ls_cname + ".Protect") = "0" then
if ll_firstcol = 0 or Long(this.Describe(ls_cname + ".TabSequence")) < ll_firstcol then
ll_firstcol = Long(this.Describe(ls_cname + ".TabSequence"))
ls_firstcol = ls_cname
end if
if ll_lastcol = 0 or Long(this.Describe(ls_cname + ".TabSequence")) > ll_lastcol then
ll_lastcol = Long(this.Describe(ls_cname + ".TabSequence"))
ls_lastcol = ls_cname
end if
end if
end if
next