ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Spreadsheet Control on User Form (https://www.excelbanter.com/excel-programming/302789-spreadsheet-control-user-form.html)

Paul Worthington

Spreadsheet Control on User Form
 
Hi,
(First time poster)
I have a spreadsheet control on a user form (UserForm1) and am trying
to control the start-up position of another form (UserForm2)that is to
contain a list of actions on the cell clicked on. My code to
initialise UserForm2's start-up position runs somewhere along these
lines (the spreadsheet control is named ss1):

UserForm2.Top = ss1.Activecell.Top + ss1.Top + UserForm1.Top
UserForm2.Left = ss1.Activecell.Left + ss1.Left + UserForm1.Left


Although clicking on different cells affects the start-up position, as
I click cells progressively further right the form 'drifts away' from
the cell. I have also tried using EventInfo.X and EventInfo.Y but
with little success.

Many Thanks for any help.


All times are GMT +1. The time now is 06:26 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com