vb 实现打开excel 单元格自适应高度

Sub auto_open()
'
' 宏2 宏
'
Dim g As Integer
g = 3


For i = 1 To 2

    Range("a" + CStr(i + (i - 1) * 3) + ":c" + CStr(i * 3)).Select
    Selection.UnMerge
    Selection.Rows.AutoFit
    Selection.Merge
    
Next i

    
End Sub

 

你可能感兴趣的:(vb)