View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Refeencing a check box on an Excel sheet

Geez I was trying to get that to work but it just would not go for some
reason... Now that I see yours I realize I was spelling checkboxs not
checkboxes (missing the e)... I am chalking that one up to sleep
deprivation...

Note to the OP that the checkbox from the forms toolbar does not return true
and false by default. It returns a long which is either xlOn, xlOff and one
other (mixed I believe) so you may need to coerce the returned value into
something more useful...

if activesheet.checkboxes("Check Box 95").Value = xlOn then
msgbox "Check Box 95 is checked"
end if
--
HTH...

Jim Thomlinson


"Bob Phillips" wrote:

activesheet.checkboxes("Check Box 95").value

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"jayklmno" wrote in message
...
I have added a check box control to a sheet in Excel and am trying to

check
that box for it's true/false value. How do I find out the name of the
control? I see Excel named it Check Box 95, but I can't get it to refernce
the value...

if checkbox95 = true then...

doesn't work, or when I refernce the sheet directly. What is the correct
syntax for this..

Thanks!