View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein Rick Rothstein is offline
external usenet poster
 
Posts: 5,934
Default Untick a Checkbox on a userform


I presume your code to show UserForm2 is located in the Click event for the
CheckBox on UserForm1. As long as your code to show UserForm2 looks like
this...

Private Sub CheckBox1_Click()
'
' Other possible code
'
If CheckBox1.Value = True Then UserForm2.Show
'
' Other possible code
'
End Sub

then you can place this code...

Private Sub UserForm_Terminate()
UserForm1.CheckBox1.Value = False
End Sub

in the Terminate event for UserForm2

--
Rick (MVP - Excel)


"John" wrote in message
...
Hi,

I have two useforms. Useform1 has a Checkbox which when ticked opens
Userform2. When Userform2 is closed i would like the tick in the Checkbox
in
Userform1 to not be their. How would this be done and where would the
code
go please?

Thanks
John