checkbox

  • Thread starter Thread starter antonov
  • Start date Start date
A

antonov

I have 2 problems with checkboxes:

1. in exel 2003 it it possible to clear the text in the checkboxes I've
placed in my workbook?

2. I have a checkbox in an userform. When I checkit I would like the result
to appear in one of the checkboxes in my workbook. How can I do that?
Checkbox1 is over cell H25.....

Thanks
 
Hi Antonov.

Assume that checkboxes are on Sheet1 and that the are fromthe Forms toolbar.

(1) Try:

ActiveSheet.CheckBoxes = xlOff

(2)

In the Userform's CheckBox Click event, try something like:

Private Sub CheckBox1_Click()

Sheets("Sheet1").Range("H25").Value = _
Me.CheckBox1.Value
End Sub
 
Hello Norman,
I've tried what you sent me.
When I launch the userform I get the first error with the first part of the
formula:
ActiveSheet.CheckBoxes = xlOff (invalid outside procedure)

When I check the checkbox the answer in H25 = true but the checkbox doesn't
seem to work....

I know I must be doing something wrong....
 
Hi Antonov,

Perhaps I was insufficiently explicit.

I gave :

as a method of clearing all the textboxes in one fell swoop. To use this
instruction it must be included in a procedure. For example, put the
following sub in a normal module and run it:

Sub ClearTextBoxes()
ActiveSheet.CheckBoxes = xlOff
End Sub

If, however, your intention is to clear these textboxes when running the
Userform, then you could add an appropriate instruction to the Userforms
initialize event. e.g.:


Private Sub UserForm_Initialize()
Sheets("Sheet1").CheckBoxes = xlOff

End Sub
When I check the checkbox the answer in H25 = true but the checkbox
doesn't seem to work....

Have you linked the checkbox to the H25 cell?

If not:

Right-click the checkbox | Select the Control tab | type H25 in the Cell
Link box.
 
Hello Norman,
first of all thanks for your patience....

I've applied

Sub ClearTextBoxes()
ActiveSheet.CheckBoxes = xlOff
End Sub

but the reply is:

"Run-time error '1004' Unable to set the_Default property of the checkboxes
class"

Now the box in cell H25 becames black as all the inputs I do go together.
 
Hi Antonov,

Two possibilities immediately occur:

(1) The sheet with the checkboxes is *not* the active sheet when you run the
command

(2) The checkboxes are not from the Forms Toolbar but from the Control
Toolbox - See my first post!
 

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

Similar Threads


Back
Top