Clear a Checkbox in a a user form

  • Thread starter Thread starter Cerberus
  • Start date Start date
C

Cerberus

I am new to creating user forms so forgive me if this is really basic. I
have a checkbox that when clicked opens a new user form to get more details
for this product. I am trying to make it so if the user picks the "Cancel"
command it unloads the detail page and also clears the checkbox on the
original user form. How do I go about this? Thanks for any help on this in
advance.
 
hi
check boxes are boolean.
in the code that unloads the detail page, add this..
if checkbox1= true then
checkbox1 = false
end if
this will clear the check from the box.

Regards
FSt1
 
I tried that code but I may have done something wrong. I put this in

Private Sub CommandNOKEXT_Click()
If CheckExtension = True Then
CheckExtension = False
End If
Unload Extensions
End Sub

and I also tried it withe the Unload Extensions first but I still have the
checkbox marked.
 
Make sure you refer to the right CheckExtension checkbox. Qualify it by the
userform name:

Private Sub CommandNOKEXT_Click()

'just uncheck it
userform1.CheckExtension = False

Unload Me 'Extensions

'show the original userform????
userform1.show '????
End Sub
 
hi
did you reference the other form????
Private Sub CommandNOKEXT_Click()
If Userform1.CheckExtension = True Then
Userform1.CheckExtension = False
End If
Unload Extensions
End Sub

otherwise the code may think your talking about the current userform. maybe
i didn't make that clear.

Regards
FSt1
 
If I wasn't so new at it and/or I wasn't a little slow on the up-take, you
were clear. Thanks for your help.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top