自由输入行高列宽的VBA代码,行高单位默认为(字符),列宽单位默认为(磅)。也就是说 列宽10 ≠ 行高10
---------------------------------------------------------------------
Sub VBA设置Excel行高列宽()
dim intWidth as integer
dim intHeight as integer
intWidth = inputbox("请输入列宽")
intHeight= inputbox("请输入行高")
ActiveWindow.RangeSelection.ColumnWidth = intWidth
ActiveWindow.RangeSelection.RowHeight = intHeight
End Sub
---------------------------------------------------------------------
Sub VBA设置Excel列宽()
dim intWidth as integer
intWidth = inputbox("请输入列宽")
ActiveWindow.RangeSelection.ColumnWidth = intWidth
End Sub
---------------------------------------------------------------------
Sub VBA设置Excel行高()
dim intHeight as integer
intHeight= inputbox("请输入行高")
ActiveWindow.RangeSelection.RowHeight = intHeight
End Sub