View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
SuperJas SuperJas is offline
external usenet poster
 
Posts: 66
Default Problem identifying with Checkbox's status

Hi Greg

Thanks for your suggestion. Unfortunately it still fails to recognise the checkbox is checked

I'm thinking that it's because the ctrlDummy doesn't have a Value method, and hence the ctrlDummy.Value isn't actually going to the checkbox's value

So to get around this, is it possible to create another variable like so

--------------------------------
Dim chkDummy as MSForms.Checkbo
--------------------------------

and then set the chkDummy to the ctrlDummy checkbox

I was thinking along the lines of

----------------------------------------------------
For Each ctrlDummy In Userform.Control

If TypeOf ctrlDummy Is MSForms.CheckBox The

****Set chkDummy = CtrlDummy***

If chkDummy.Value = True The
ReDim Preserve MyArray(i
MyArray(i) = chkDummy.Nam
i = i +
End I

End I

Next ctrlDumm
----------------------------------------------------

The "****" line is causing errors. What would be the correct code to achieve this

Thanks very much

SuperJas.