I don't want the close button (red X in the upper right corner) to be visible in a userform I'm creating. How do I remove it?
I don't want the close button (red X in the upper right corner) to be visible in a userform I'm creating. How do I remove it?
Hi bishoposiris,
I think it would be in the "Properties" of the userform. Click on View and show the Properties. I just went through all of them and didn't see how you can remove the close "X" from the form.
Maybe one of the smart guru's has an answer.
One test is worth a thousand opinions.
Click the * Add Reputation below to say thanks.
Removing it might be a pain, but if you'd be satisfied with disabling it, then including the following in your userform's code window should work:
Please Login or Register to view this content.
removing it is actually a pain in the buttock
i was like Marvin and thought it was in properties though i recall the option may was there in VB6?
a quick goggle search found
http://www.ozgrid.com/forum/showthread.php?t=85960
see attached translated file
If you are satisfied with the solution(s) provided, please mark your thread as Solved.
Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.
Hi bishoposiris
Here is some Code written by our own Leith Ross that will disable and dim the X (to Close) on a User Form.
Please Login or Register to view this content.
John
If you have issues with Code I've provided, I appreciate your feedback.
In the event Code provided resolves your issue, please mark your Thread as SOLVED.
If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.
HEllo bishoposiris,
Add this code to a new VBA Module in your workbook's VBA Project. Call the Sub from your UserForm's Activate event module.
VBA Module Code
Userform_Activate() Event CodePlease Login or Register to view this content.
Please Login or Register to view this content.
Sincerely,
Leith Ross
Remember To Do the Following....
1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.2. Thank those who have helped you by clicking the Star below the post.3. Please mark your post [SOLVED] if it has been answered satisfactorily.
Old Scottish Proverb...
Luathaid gu deanamh maille! (Rushing causes delays!)
I need to hide or make the "x" button invisible as well, but I am using a 64 bit operating system.
I am not familiar enough with VBA to modify the code between 32 bit and 64 bit.
What do I need to do to make the code work?
Hi Jessica240
I've converted some code from 32 bit to 64 bit but am certainly not expert at it. If you were to upload your file with existing code I'll look at it. Your best bet would be to Private Message Lieth Ross and ask him to look at it with you.
John
Administrative Note:
Welcome to the forum.
We are happy to help, however whilst you feel your request is similar to this thread, experience has shown that things soon get confusing when answers refer to particular cells/ranges/sheets which are unique to your post and not relevant to the original.
Please see Forum Rule #4 about hijacking and start a new thread for your query.
If you are not familiar with how to start a new thread see the FAQ: How to start a new thread
1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
2. If your question is resolved, mark it SOLVED using the thread tools
3. Click on the star if you think someone helped you
Regards
Ford
Sorry, Ford...I don't agree,,, Jessica240's request is right on point...I'd ask you to allow it to proceed.
I'm sorry. I am new to using forums and will be cognizant of that rule moving forward. I found a solution to execute the desired events when the red X is clicked by using the queryclose technique. I can leave the button on the form now.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks