hi
i want the "X" to disappear from the form when i click on a menu:
Private Sub faq_Click()
help.Show
Delta.ControlBox.Visible = False
End Sub
help please
Printable View
hi
i want the "X" to disappear from the form when i click on a menu:
Private Sub faq_Click()
help.Show
Delta.ControlBox.Visible = False
End Sub
help please
Why hide it? (I assume you arte just talking about the "X" and not the whole control box)
VB Code:
Option Explicit Private mbAllowClose As Boolean Private Sub faq_Click() help.Show mbAllowClose = False End Sub Private Sub Form_Load() mbAllowClose = True End Sub Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer) If UnloadMode = vbFormControlMenu And Not mbAllowClose Then Cancel = True MsgBox "Nope, can't do that" End If End Sub
hi,
i'd just like the X to disappear or get disabled when i open a new window by pressing on a commandbutton so that ull have to close that new window before the old one. i want the "X" to get enabled again when i close the new window.
what's wrong with:
VB Code:
Private Sub faq_Click() help.Show firstwindow.ControlBox.Visible = False End Sub
Make the second window Modal. That way no other form can be accessed until it is closed.
help.Show vbModal
thanks
exactly what i need
In future posts of yours let me suggest something. Rather that saying how you want to do something like you did initially, it's better just to state what you want to do. In this case it would have been something like "I want to prevent the user from closing form1 until after form2 is closed". Hope that helps.