View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
Pierre via OfficeKB.com[_2_] Pierre via OfficeKB.com[_2_] is offline
external usenet poster
 
Posts: 122
Default problem userform disappears

Hi Peter,

Your code works fine but now the main form ('startformulier') disappers
completely when the 'disclaimer' form is shown. Can i have the 'disclaimer'
form shown and close on top of the 'startformulier' form ?
thanks for your input !
Pierre

Peter T wrote:
Hi Bart,

I'm not sure why clicking the OK to unload your disclaimer for causes your
main form to unload. However if user clicks the little "x" it would. Try
something like

in your 'startformulier' form

Private Sub but_disclaimer_Click()
' me.hide
disclaimer.Show
' me.show
End Sub

in your discalimer form

Private Sub but_ok_Click()
Unload Me
End Sub

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Dim Ans As Long
If CloseMode = vbFormControlMenu Then
but_ok_Click
End If
End Sub

You might also want to set the Cancel property of but_ok_Click to True.

Regards,
Peter T

Hi,

[quoted text clipped - 28 lines]

but i feel this is not the right way to do this.



--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200510/1