Hi everyone,
First day here and I've run into two problems. I was fortunate enough to have my first one quickly answered by Charles. I'm pretty sure this forum will go 2 for 2 today since this problem seems to be a lot simpler (at least amount of code wise).
This macro is going to be used by multiple workbooks (but only one at a time). Each workbook will have a different number of worksheets, but will always need Columns A through H to be autofitted. Here is my code:
Any idea why this isn't working? I'm pretty bad at loops, so that could be the main reason.Sub FitNow()
'Autofit main columns of workbook
Dim i, j As Integer
Set j = Sheet.Count
For i = 1 To j
ActiveWorkbook.Sheets(i).Columns("A:H").EntireColumn.AutoFit
Next
End Sub
Thank you in advance for your help and insight
Bookmarks