📜  excel vba autofit - VBA 代码示例

📅  最后修改于: 2022-03-11 14:51:53.397000             🧑  作者: Mango

代码示例1
' Autofits all columns / rows of the range
Range("MY_RANGE").EntireColumn.AutoFit
Range("MY_RANGE").EntireRow.AutoFit

' Autofits a single column / row
Range("MY_RANGE").Columns(1).EntireColumn.AutoFit
Range("MY_RANGE").Rows(1).EntireRow.AutoFit