![]() |
autofit function in excel
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 ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
autofit function in excel
Try some thing more specific eg. :- Workbooks("wb1.xls").Worksheets("Sheet1").Columns( "A:E").AutoFit although Activesheet.Columns("A:E").AutoFit should work too ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~View and post usenet messages directly from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 05:40 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com