ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Prevent user moving the userform with mouse (https://www.excelbanter.com/excel-programming/396797-prevent-user-moving-userform-mouse.html)

AP[_3_]

Prevent user moving the userform with mouse
 

I have a userform which is gradually moved downwards by a macro.

I would like to prevent the user from manually shifting the userform (by
dragging the title bar with the mouse). At the same time, I would like to
allow the buttons on the userform to be interactive with the user.

"UserForm1.Enabled = False" prevents the user from shifting the userform ...
but also disables all buttons on the userform!

Any help would be greatly appreciated.



Peter T

Prevent user moving the userform with mouse
 
Why not remove the form's caption altogether, plenty of examples in this ng.
You might need add a close button, if you don't already have one, to
simulate the little x.

Regards,
Peter T

"AP" wrote in message
...

I have a userform which is gradually moved downwards by a macro.

I would like to prevent the user from manually shifting the userform (by
dragging the title bar with the mouse). At the same time, I would like to
allow the buttons on the userform to be interactive with the user.

"UserForm1.Enabled = False" prevents the user from shifting the userform

....
but also disables all buttons on the userform!

Any help would be greatly appreciated.





[email protected]

Prevent user moving the userform with mouse
 

Thanks for the excellent suggestion ... I found the code in "Colo's
Junk Room".

Cheers

On Sep 4, 2:46 am, "Peter T" <peter_t@discussions wrote:
Why not remove the form's caption altogether, plenty of examples in this ng.
You might need add a close button, if you don't already have one, to
simulate the little x.

Regards,
Peter T

"AP" wrote in message

...





I have a userform which is gradually moved downwards by a macro.


I would like topreventtheuserfrom manually shifting the userform (by
dragging the title bar with the mouse). At the same time, I would like to
allow the buttons on the userform to be interactive with theuser.


"UserForm1.Enabled = False" prevents theuserfrom shifting the userform

...
but also disables all buttons on the userform!


Any help would be greatly appreciated.- Hide quoted text -


- Show quoted text -





All times are GMT +1. The time now is 01:25 PM.

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