![]() If oOLEObject. This video will show you how to create checkbox on Excel 2010. Sheet2.Cells(lCount, 3).Value = colCheckboxValues.Item(lCount)(2) 'Checked (or unchecked)įunction GetCheckBoxValuesFromSheet(sht As Worksheet) As CollectionĬonst HTMLCheckBoxProgID As String = "Forms.HTML:Checkbox.1" Excel 2010 create checkbox Knowledge 12.4K subscribers Subscribe 114 20K views 7 years ago Ms. Sheet2.Cells(lCount, 2).Value = colCheckboxValues.Item(lCount)(1) 'Value Sheet2.Cells(lCount, 1).Value = colCheckboxValues.Item(lCount)(0) 'HTMLName Set colCheckboxValues = GetCheckBoxValuesFromSheet(Sheet1)įor lCount = 1 To colCheckboxValues.Count Checkbox values are converted to strings. This collection is then written to to Sheet2. Checked: "TRUE" or "FALSE" depending on whether it was checked or not.Here's some sample code I threw together which searches Sheet1 for HTML checkboxes and then fills a collection with string arrays which contain three elements as follows: You can then check the progID of each object to see if it is an HTML Checkbox ( Forms.HTML:Checkbox.1) and then take a note of its value if this is the case. You should be able to access these checkboxes through the OLEObjects collection which is a member of the Worksheet object. I cannot think of a way to do this via Excel formulas - you don't mention it explicitly, but you could use VBA to obtain a solution. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |