excel 在vba里怎么调整列宽
h 问题点数:2、回复次数:1Top
1 楼Arqui(我要吃饭)回复于 2006-02-20 18:58:03 得分 2
'作用:设置worksheet列宽
'其中Cells(2,2)用来输入列宽,button用来触发子过程。
Private Sub CommandButton1_Click()
Dim col As Integer
If Cells(2, 2).Value = "" Then
MsgBox ("请输入列宽。")
Else
col = Cells(2, 2).Value
Columns.ColumnWidth = col
End If
End SubTop




