autofit function in excel

  • Thread starter Thread starter solo_razor
  • Start date Start date
S

solo_razor

hello,

I have a terrible anoying little problem. My macro generates multiple
workbooks of data extracted from one sheet. Now the sheet where i
placed the buttons gets autofitted, even though i assigned the
workbooks as windows("wb1.xls").activate and than
activesheet.cells.select
selection.autofit

I always autofits my macro sheet(as i like to call it)

Any suggestions?

Regards,
Niek
 
Try some thing more specific eg. :-
Workbooks("wb1.xls").Worksheets("Sheet1").Columns("A:E").AutoFit

although Activesheet.Columns("A:E").AutoFit should work too
 
Back
Top