VBA Adjust all columns size

Опубликовано: 05 Октябрь 2024
на канале: Simplified Excellence
237
1

Adjust all columns size of a file or sheet in one line of code.

Code:
Sub adjust_all_columns_size()

Dim ws_sheet As Worksheet

'identify sheet
Set ws_sheet = Worksheets(1)

'adjust size of all columns
ws_sheet.Cells.EntireColumn.AutoFit

End Sub

-------------------------------
NEED HELP?
-------------------------------
Leave a comment with your questions, issues or projetcs and I will try to answer with a video.

-------------------------------
THANK YOU
-------------------------------
For watching my videos,
Your shares
And your comments!