PDA

View Full Version : Changing a checkbox value



Tommy
03-26-2009, 01:08 PM
Howdy do!

I have written an Excel Com add-in. In the prebuilt workbook I have controls that were added with the toolbox. When I go to change the value of one on the checkboxes it doesn't work. :banghead:

When I step through the code I can see the check appear and disappear. I can rewind or step through the code again and the check does not appear anymore. :(

The strangest part is while I was fighting with this I clicked the Design Mode button and stepped through the code and the check mark showed up and stayed (This is not an option, beside that I can't duplicate it.). When looking at the watch window the value is as I set it. I have also noted that there is a locked property but changing that still has no effect on the outcome as far as I can see.:dunno

This is the line of code that is not behaving.


XL.ActiveWorkbook.Worksheets(mInfo).Shapes("CheckBox11").OLEFormat.object.object.Value = 1


Can somebody please give me a clue before I introduce the computer to my little friend?:devil2:

p45cal
03-26-2009, 01:38 PM
only a guess.. how about a
Do Events
after that line?

Tommy
03-26-2009, 01:54 PM
Well that was not it. :(I think it has something to do with some type of protection, though I don't know what. The sheet nor the workbook are protected.