|
-
Oct 4th, 2005, 03:05 AM
#1
Thread Starter
New Member
SOLVED: (thanks) userform close-symbol
Hello,
is it possible to hide or to disable the close-symbol ((X) upper right) on a userform? And if so, how you do it ??
Thanks in advange
Last edited by tonyelyn; Oct 6th, 2005 at 11:08 AM.
-
Oct 4th, 2005, 08:54 AM
#2
Junior Member
Re: userform close-symbol
Hi
pls give some more information about the userfom!
is it in VB / Excel / Word ...... ?
Chris
-
Oct 4th, 2005, 10:14 AM
#3
Thread Starter
New Member
Re: userform close-symbol
 Originally Posted by Chris67
Hi
pls give some more information about the userfom!
is it in VB / Excel / Word ...... ?
Chris
excuse me,
the form is made in EXCEL.
Commandbuttons are on the userform and are used to simplify the work of other users.
-
Oct 4th, 2005, 11:11 AM
#4
Re: userform close-symbol
I dont think you can get a handle on the Excel VBA userform object the same way you can in VB Form object to disable the X button.
You can cheat though by intercepting the X QueryClose command like below
put this code in a userform, and try pressing the X button !
VB Code:
Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode = vbFormControlMenu Then
Cancel = True
End If
End Sub
-
Oct 4th, 2005, 11:32 AM
#5
Re: userform close-symbol
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Oct 4th, 2005, 11:47 AM
#6
Re: userform close-symbol
Fair play Rob Dogg,
will be nicking that bit of code myself !!!
Didn't know you could do that with VBA userforms.
-
Oct 4th, 2005, 11:50 AM
#7
Re: userform close-symbol
Me neither but I thought it was worth a try. Not having a controlbox or system menu I wouldnt think it would work but it did just as if it was there. The close menu item in the system menu is in the same place for all stardard windows. So I took a chance.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|