excel column autofit

Lance Hoffmeyer lance at augustmail.com
Tue Jun 12 18:09:19 EDT 2007


Hey all,

Wondering why the syntax won't autofit Column A?
I am not getting any errors.

Also, is there a way of reducing the number of
syntax lines?  Basically, I am wondering if there
is an easier way to copy and paste?

Thanks in Advance.

Lance

# ADD ROW LABELS
sh = wb.Worksheets ("Total")
sh.Select()
sh.Range(sh.Cells(2,1),  sh.Cells(20,1)).Select()
sh.Range(sh.Cells(2,1),  sh.Cells(20,1)).Copy()
sh = wb.Worksheets ("Current Total")
sh.Select()
sh.Range(sh.Cells(2,1),sh.Cells(20,1)).Select()
sh.Paste()
sh.Columns("A:A").EntireColumn.AutoFit



More information about the Python-list mailing list