excel中窗体位置动态显示

2025-03-01 04:24:20
推荐回答(1个)
回答1:

在Excel最大化的情况下:

Private Sub UserForm_Activate()
Me.Left = 30 + Application.ActiveCell.Left + Application.ActiveCell.Width
Me.Top = 130 + Application.ActiveCell.Top
End Sub

其中30和130请依据分辨率、Excel版本自行精确调整