PDA

View Full Version : Solved: Checkbox not allowing me to check



tatersmom
10-20-2008, 11:05 AM
Hi all,

I have written code that, when a certain button is chosen, certain checkboxes from a list are enabled.

When I run the userform, the correct checkboxes are enabled, but they don't allow me to click in the box. I tried setting the value of locked to false, but that wasn't the problem.

I can't think of what else the problem may be. I would think once I enable them, they wouldn't have a problem.

Any ideas?

Thanks so much.

lucas
10-20-2008, 11:14 AM
can you post your code or workbook. The workbook would be better.

georgiboy
10-20-2008, 11:15 AM
Welcome to the forum :kiss

It could be something to do with the modal setting of the userform or that you need to use a do events line in the code.

are you able to post an example yet?

lucas
10-20-2008, 11:16 AM
You don't say if they are checkboxes from the forms toolbar or from the visual basic(ActiveX) toolbar. Are they on the sheet or a userform?

georgiboy
10-20-2008, 11:24 AM
Lucas, she does say
When I run the userform so i made an asumption.

lucas
10-20-2008, 08:01 PM
I passed through pretty fast.....good catch georgiboy.

tatersmom
10-20-2008, 10:26 PM
Hi, and thanks for replying.

The code reads as follows:



Private Sub Button1_Click()
Call disableCategory

'this calls a method which disables all the checkboxes,
'in case another button was originally picked and
'enabled some of the checkboxes

with userform1
checkbox1.enabled = true
checkbox2.enabled = true
end wth

end sub

This is the section of code that, when I click on that button, enables the checkboxes. The boxes do enable, they turn from grayed out like the rest of them to black, but I'm not allowed to click the box.

Is this enough code or do I need to show more?



On another note entirely, what do I keep doing that accidentally posts my post while I'm still in the middle of typing it? Hmmm. That's frustrating. Sorry about that.

tatersmom
10-21-2008, 03:23 AM
A coworker of mine looked at it and figured out my problem. I wasn't activating the frame that the checkboxes were in. Once I added the line



frame.enabled = true


it worked like it should.

Thanks and sorry to waste your time.

lucas
10-21-2008, 09:33 AM
Glad to hear you worked it out. be sure to mark your thread solved using the thead tools at the top of the page.