ActiveX
To resize a cell based on the widest data in that column
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.
- Return the minimum width necessary to display the widest data in a specific column with the MaxTextColWidth property (specify the column using the lCol parameter) and assign it to a variable.
- Set the ColWidth property for that column equal to the variable from step 1.