View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
joel joel is offline
external usenet poster
 
Posts: 9,101
Default Position a user form next to selected cell

This code should work. You may want to add a little to the Left Position to
move it away from the cell


LeftPos = ActiveSheet.ActiveCell.Left
Wdth = ActiveSheet.ActiveCell.Width
TopPos = ActiveSheet.ActiveCell.Top

UserForm1.Left = LeftPos + Wdth
UserForm1.Top = TopPos

Userform1.show


"nowhereman" wrote:

I have a macro which calls a user form

When the user form opens as the macro runs it is in the center of the
screen..... is it possible to cause it to be positioned next to the
selected cell.

I see a "manual" choice in the form properties, I am not brilliant enough
to figure how to make that setting work manually, much less with code.

TIA for any help you have time to offer

NWM