I wrote some codes to fill the cells of a worksheet, I want to know how can I adjust the size of the cell with the size of the text inside it?
I wrote some codes to fill the cells of a worksheet, I want to know how can I adjust the size of the cell with the size of the text inside it?
example [VBA]
Option Explicit
Sub Adjust()
Sheet1.Columns.AutoFit
End Sub
[/VBA]
You know you're really in trouble when the light at the end of the tunnel turns out to be the headlight of a train hurtling towards you
The major part of getting the right answer lies in asking the right question...
Made your code more readable, use VBA tags (this automatically inserts [vba] at the start of your code, and [/vba ] at the end of your code) | Help those helping you by marking your thread solved when it is.