![]() |
Form start position
I have a form called "switchboard" in an excel personal.xls file.
I have another file that has a button that calls the macro "OpenSB" which essentially contains the code: "Switchboard.show" There are a couple of choices in the properties for the startu position of this form, but I would like it in a different position ( little left of center actually). I know the properties startupposition needs to be on manual, but othe than that how do I control the form's position more? 1. What code 2. Where that code belongs (I get confused about where I should b putting the code, I guess it should go in the personal.xls MainModule And what about load or unload? Is that needed? If so why, and wher should it go? Thanks for any help you can offer. Dre -- Message posted from http://www.ExcelForum.com |
Form start position
You can experiment to see where you want the form positioned. The code goes
in the UserForm module: Private Sub UserForm_Activate() Top = 200 Left = 200 End Sub Your Show command will automatically load the UserForm; there is no need for a separate Load statement. To unload the form, use: Unload Me if in the UserForm module, or: Unload Switchboard if in another module. -- Vasant "drewdog " wrote in message ... I have a form called "switchboard" in an excel personal.xls file. I have another file that has a button that calls the macro "OpenSB", which essentially contains the code: "Switchboard.show" There are a couple of choices in the properties for the startup position of this form, but I would like it in a different position (a little left of center actually). I know the properties startupposition needs to be on manual, but other than that how do I control the form's position more? 1. What code 2. Where that code belongs (I get confused about where I should be putting the code, I guess it should go in the personal.xls MainModule. And what about load or unload? Is that needed? If so why, and where should it go? Thanks for any help you can offer. Drew --- Message posted from http://www.ExcelForum.com/ |
Form start position
Vasant:
Wow! It actually works. Can't thank you enough man. This was bugging m big time. Dre -- Message posted from http://www.ExcelForum.com |
All times are GMT +1. The time now is 12:41 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com