>for lnI = 1 to m.lnCols > .Cells(1,laFieldNames[m.lnI,3]).value = laFieldNames[m.lnI,1] > .columns[m.lnI].autofit() > try > if .columns[m.lnI].columnwidth < 50 >** To make sure long descriptions fit > .columns[m.lnI].columnwidth = .columns[m.lnI].columnwidth * 5 > > endif > catch to loRangeProblem >* Let's ignore this error with the range and column width > endtry >nextFor what it is worth
xlSheet.PageSetup.PrintTitleRows = "$1:$1" for i = 1 to m.ncols =m.xlSheet.Columns(m.i).EntireColumn.AutoFit endfor