UserForm Positioning

  • Thread starter Thread starter donovanm
  • Start date Start date
D

donovanm

Hi there!

I have a user form that is loaded as part of a loop. When the user
clicks OK, the form is unloaded and the VBA continues. When the loop
starts again the form is loaded again, and the cycle continues.

The problem I have is that I want the form to appear in the position
where it was last time around in the loop. For example, if the user
moves the form to the left hand coner of the screen and clicks OK, I
want the form to load in the left hand corner of the screen next time
the form is loaded.

It would also be ok, if the form remained permenantly on the screen and
did not re-position every time it went through thr loop.

Could any one point me in the right direction?

Thanks,

Matt
 
Matt,

Chip Pearson has a page on form positioning that might help at
http://www.cpearson.com/excel/FormPosition.htm

Why do you unload the form. If it is okay to leave it up, why not just leave
it up. In XL2000 on you can make the form modeless if you wan t to allow
worksheet activity to continue. This is a form property, or can be set when
the form is shown.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Matt,

Don't unload the userform each time within the iteration of the
loop. Just Hide it.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
 
Back
Top