#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default checkbox

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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default checkbox

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

---
Regards,
Norman



"antonov" wrote in message
.. .
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





  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default checkbox

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....
"Norman Jones" wrote in message
...
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

---
Regards,
Norman



"antonov" wrote in message
.. .
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







  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default checkbox

Hi Antonov,

Perhaps I was insufficiently explicit.

I gave :

ActiveSheet.CheckBoxes = xlOff


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.


---
Regards,
Norman



"antonov" wrote in message
.. .
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....
"Norman Jones" wrote in message
...
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

---
Regards,
Norman



"antonov" wrote in message
.. .
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









  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default checkbox

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.



"Norman Jones" wrote in message
...
Hi Antonov,

Perhaps I was insufficiently explicit.

I gave :

ActiveSheet.CheckBoxes = xlOff


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.


---
Regards,
Norman



"antonov" wrote in message
.. .
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....
"Norman Jones" wrote in message
...
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

---
Regards,
Norman



"antonov" wrote in message
.. .
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













  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default checkbox

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!


---
Regards,
Norman



"antonov" wrote in message
.. .
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.



"Norman Jones" wrote in message
...
Hi Antonov,

Perhaps I was insufficiently explicit.

I gave :

ActiveSheet.CheckBoxes = xlOff


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.


---
Regards,
Norman



"antonov" wrote in message
.. .
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....
"Norman Jones" wrote in message
...
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

---
Regards,
Norman



"antonov" wrote in message
.. .
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













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
CheckBox Q Sean Excel Worksheet Functions 1 February 15th 08 10:21 AM
How to have Checkbox A uncheck with checked Checkbox B Texas Aggie Excel Discussion (Misc queries) 3 July 20th 07 10:58 PM
checkbox? rwijnia Excel Worksheet Functions 4 November 3rd 05 07:40 PM
Checkbox Luke Excel Discussion (Misc queries) 1 October 14th 05 01:58 PM
Checkbox value Todd Huttenstine Excel Programming 1 February 10th 04 10:09 PM


All times are GMT +1. The time now is 08: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"