ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Unload CheckBox (https://www.excelbanter.com/excel-programming/361168-unload-checkbox.html)

Robert[_30_]

Unload CheckBox
 
Hello,

I am building a VBA statement in which I want to unload a couple of
CheckBoxes. Can someone tell me which code to use?

Thanks a lot for your help!!!

Rgds,
Robert


Ivan Raiminius

Unload CheckBox
 
Hi Robert,

could you be more specific?

Regards,
Ivan


Robert[_30_]

Unload CheckBox
 
Hi Ivan,

I am making a sheet to manage a company's stock. In a particular sheet
I have put a couple of Checkboxes (the square ones in which you can put
a "V" ;-)) that indicate if an item is received or not. What the
current statement does is it copies the # of units received and adds it
to the number of items already in stock (I linked a formula that grabes
the # of ordered items when the Checkbox is active). To prevent that
the statement keeps adding units I want to incorporate a statement that
automatically deactivates the checkbox.

Hope that you can make something out of it!;-)

Thanks a lot for your help!!

Rgds,
Robert


Ivan Raiminius

Unload CheckBox
 
Hi Robert,

you may need something like:

activesheet.checkbox1.enabled=false (or
ActiveSheet.OLEObjects("CheckBox1").Object.enabled = false) 'disables
checkbox

or
ActiveSheet.Shapes("CheckBox1").delete (or
ActiveSheet.OLEObjects("CheckBox1").delete) 'deletes checkbox

I hope it helps.

Regards,
Ivan


Christian[_8_]

Unload CheckBox
 
Try the code in this link

http://groups.google.com.au/group/mi...f 9d46fb4dd4d


Cheers Christian


Robert[_30_]

Unload CheckBox
 
Hi Ivan,

Thanks for the info.
But when I add your statement the Checkbox turns grey after running the
macro and I can not modity it anymore. The only things that needs to be
done is unchecking the checkbox.
Hope you know a statement for that.

Rgds,
Robert


Ivan Raiminius

Unload CheckBox
 
Hi Robert,

sure.

By "I want to incorporate a statement that automatically deactivates
the checkbox" I understood that you want to disable the checkbox. For
unchecking use:

activesheet.checkbox1.value=false (or
ActiveSheet.OLEObjects("CheckBox1").Object.value = false) 'unchecks
checkbox

Regards,
Ivan



All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com