Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,069
Default Untick a Checkbox on a userform


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

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Untick a Checkbox on a userform


Hi,

I imagine you have used the click event of the checkbox on userform1 to call
userform2 si simply set it to false immediatly after it is checked

Private Sub CheckBox1_Click()
CheckBox1 = False
UserForm2.Show
End Sub

Mike

"John" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.programming
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


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Untick a Checkbox on a userform


Use the Terminate Event of Userform2

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


--
If this post helps click Yes
---------------
Jacob Skaria


"John" wrote:

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UserForm CheckBox Help Joe_Hunt via OfficeKB.com Excel Programming 2 October 21st 08 03:18 PM
link a checkbox in a sheet to a checkbox on a userform? Arjan Excel Programming 0 November 10th 06 01:37 PM
Userform Checkbox Bill[_30_] Excel Programming 1 June 20th 06 10:07 PM
CheckBox on UserForm Michel[_4_] Excel Programming 0 August 3rd 04 12:38 AM
Userform and checkbox.... Ben.c Excel Programming 3 December 19th 03 05:56 PM


All times are GMT +1. The time now is 01:44 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"