UserForm StartUpPosition [英] UserForm StartUpPosition
问题描述
.Top = Application.Top + 125
.Left = Application.Left + 125
这是非常好的,但我真正想要的是在活动单元格旁边弹出窗体。
我以下尝试的不工作,我不知道为什么。我想要窗体的左上角触摸活动单元格的右上角,但是表单最后覆盖了活动单元格
。 Top = ActiveCell.Top
.Left = ActiveCell.Left + ActiveCell.Width
任何建议? p>
根据您的预期,这适用于我:
.Top = ActiveCell.Top + ActiveCell.Height / 2 + .Height
.Left = ActiveCell.Left + ActiveCell.Width * 1.5
I have made a nice calendar pop up in excel and tested the UserForm position with:
.Top = Application.Top + 125
.Left = Application.Left + 125
This works great however what I truly would like is to have the form pop up right next to the active cell.
What I have tried below is not working and I am not sure why. I want the top left corner of the form to touch the top right of the active cell, however the form ends up covering the active cell
.Top = ActiveCell.Top
.Left = ActiveCell.Left + ActiveCell.Width
Any Suggestions?
This is working for me as you expect:
.Top = ActiveCell.Top + ActiveCell.Height / 2 + .Height
.Left = ActiveCell.Left + ActiveCell.Width * 1.5
这篇关于UserForm StartUpPosition的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!