ActiveX
To resize a cell based on the widest data in that cell
At run time,
- If your control contains more than one sheet, specify the sheet with which you want to work by setting the Sheet property.
- Define the cell you want to resize with the Col and Row properties.
- Return the minimum width necessary to display all the text within that cell using the MaxTextCellWidth property and assign it to a variable.
- Set the ColWidth property to the variable from step 2.