Greetings,

I have a datasheet, created through VBA, and I am trying to automate setting the column widths to Best Fit. Currently I loop through the controls using the code below

Code:
    'Set width of columns to best fit data
    Dim ctl As Control
    For Each ctl In Forms![Form1].Controls
        If (ctl.ControlType = acTextBox) Then
            ctl.SetFocus
            Call TBBestFit
...