Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I want my VBA code to be able to reference the value of a check box on a
worksheet but I can't get the right syntax for the routine to recognize the object. Simple, right? Help! The object, called, say, "workBut" lists this in the formula bar - "=EMBED("Forms.CheckBox.1","") What could that possibly mean. Is it a clue? |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() You can use code like the following: Dim ChkBox As MSForms.CheckBox Set ChkBox = Worksheets("Sheet1").OLEObjects("CheckBox1").Objec t If ChkBox.Value = False Then Debug.Print "not checked" Else Debug.Print "checked" End If Change Sheet1 to the appropriate sheet name and change CheckBox1 to the appropriate control name. Cordially, Chip Pearson Microsoft Most Valuable Professional Excel Product Group, 1998 - 2009 Pearson Software Consulting, LLC www.cpearson.com (email on web site) On Tue, 10 Feb 2009 15:05:01 -0800, TKoel wrote: I want my VBA code to be able to reference the value of a check box on a worksheet but I can't get the right syntax for the routine to recognize the object. Simple, right? Help! The object, called, say, "workBut" lists this in the formula bar - "=EMBED("Forms.CheckBox.1","") What could that possibly mean. Is it a clue? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Object Variable Not Set Error on Selection object | Excel Worksheet Functions | |||
MS Query import from Excel - Syntax Error | Excel Discussion (Misc queries) | |||
What is the syntax for the IF formula in Excel? | Excel Worksheet Functions | |||
Excel Match value_lookup asterisk syntax | Excel Worksheet Functions | |||
Excel Rank syntax | Excel Worksheet Functions |