Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Position a user form next to selected cell

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do set/ fix the opening position of a user form DataBoy Excel Discussion (Misc queries) 0 September 28th 09 07:29 PM
Position selected cell nobbyknownowt Setting up and Configuration of Excel 2 February 1st 07 08:00 AM
How to I return the position of a selected cell in a range? [email protected] Excel Programming 4 November 16th 05 02:32 PM
copy sheets selected on user form Tom Ogilvy Excel Programming 0 August 19th 04 06:15 PM
copy sheets selected on user form Ron de Bruin Excel Programming 0 August 19th 04 06:03 PM


All times are GMT +1. The time now is 05:51 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"