View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson[_5_] Dave Peterson[_5_] is offline
external usenet poster
 
Posts: 1,758
Default Retrieving the state of a checkbox (form type) from VB .NET?

I don't use vb.net, but if I were doing it in excel, I'd do:

dim testCBX as excel.checkbox
set testcbx = oworksheet.checkboxes("check box 1")

(checkboxes from the Forms toolbar usually have slightly different spellings
(extra spaces). So be a little careful.)



moogleii wrote:

Hi,

I'm hoping someone here has the saavy to solve this problem. I can't figure
out how to get the state of a checkbox (the Form-type) from VB.NET.

I can get the state of the Control Toolbox version just fine.

Here's my code for the control-type checkbox

Dim testOLE As Excel.OLEObject
testOLE = oWorkSheet.OLEObjects("CheckBox1")

However, this won't work with the Form-type, so I'm assuming the Form-type
is an OLEObject, but I no idea what it could be (a shape object?).

Anyone have any ideas what its handle might be? And yes, I have to use the
form-type. Help would be appreciated


--

Dave Peterson