View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
N10 N10 is offline
external usenet poster
 
Posts: 141
Default X button on userforms


"Bob Phillips" wrote in message
...
Careful, this will stop you ever closing the form. You need to allow some
function to close it, such as a code triggered close,

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
If CloseMode < vbFormCode Then
Cancel = True
End If
End Sub

--

HTH

RP
(remove nothere from the email address if mailing direct)


"OJ" wrote in message
ups.com...
Hi Greg, look up QueryClose in VBA Help but this will disable the
X.....

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As
Integer)
Cancel = True
End Sub

Hth,
OJ




Well I found this more than usefull

Thanks :)

N10