Public Sub ResetButton(ByRef btn As Object)
Dim h As Integer 'command button height
Dim w As Integer ' width
Dim fs As Integer ' font size
With btn
h = .Height 'capture original values
w = .Width
fs = .Font.Size
.AutoSize = True 'apply maximum font size to fit button
.AutoSize = False
.Height = h 'reset original button and font sizes
.Width = w
.Font.Size = fs
End With
End Sub
解决vba控件字体变大变小的问题
最新推荐文章于 2024-06-20 13:01:37 发布