Using VSTO, how to reference checkbox embedded within an Excel Spreadsheet
-
Friday, June 04, 2010 4:12 PM
Currently I have an Excel Worksheet that has a Checkbox embedded. I am currently developing an Excel Add In using VSTO that will hold the code that will (after pressing a button in the ribbon bar ) process Data from the worksheet, part of that data is the Checkbox Value. I've tried Globals.ThisAddin.Application.ActiveWorkbook.CKbox1.value with no success. How do I point VSTO to find that Checkbox within the ActiveWorkbook? Hopefully it's a simple answer and I apologize if this is the wrong forum.
Thanks
Answers
-
Friday, June 04, 2010 8:14 PM
Nevermind. I've finally solved it. Sheetname.Ckbox1.value as long as Sheet name is declared. Was using VB.- Marked As Answer by Bessie ZhaoModerator Tuesday, June 08, 2010 8:18 AM
All Replies
-
Friday, June 04, 2010 8:14 PM
Nevermind. I've finally solved it. Sheetname.Ckbox1.value as long as Sheet name is declared. Was using VB.- Marked As Answer by Bessie ZhaoModerator Tuesday, June 08, 2010 8:18 AM
-
Wednesday, June 09, 2010 3:09 AM
Since a checkbox typically has a linked cell that reflects its value, I usually reference this cell. It's generally an easier reference to use and to debug if it misbehaves (e.g., shape and control names often are changed when an Excel 2003 workbook is opened in 2007).
- Jon
MS Excel MVP