I'm using Excel 2002.
I just had a macro that has been working for months get an error
This is the section of code that triggered the error.Error #: 1004
AutoFit method of Range class failed
All the variables are properly dimmed. I have verified that there was no error setting the value. The range is formatted as Number with 3 decimals. All the values are less than 11.
It has been working fine for several months.![]()
With shCircuits Set r = .Range("TeamResults").Columns(iRace) r.Value = .Range("TeamPoints").Value r.EntireColumn.AutoFit 'Triggers Error End With
Are there any reasons why autofit would fail? Help says it will fail only if r is not a column.
The only thing I can think of is that the width of the sheet may have hit some limit. I am using column IU
Bookmarks