Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I have the following code for each sheet in my workbook to make the cells
grow with the data entered automatically: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Intersect(Target(1, 1), [A:A]) Is Nothing Then Exit Sub Target(1, 1).EntireColumn.Autofit End Sub All of a sudden, it just stopped working and now I get an error whenever I click on one of the cells: Run-time error '1004' AutoFit Method of Range class failed When I press debug it takes me to the line Target(1, 1).EntireColumn.Autofit Any suggestions? Thanks in advance! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I switch off automatic formatting (e.g. dates)? | Excel Discussion (Misc queries) | |||
Automatic backup copy | Charts and Charting in Excel | |||
Automatic Chart Update? | Charts and Charting in Excel | |||
Is there an automatic way to change numbers such as 12312001 t | Excel Discussion (Misc queries) | |||
Autofit in excel - cell is large than what is needed or wanted & . | Excel Discussion (Misc queries) |