View Single Post
  #1   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

I have three checkboxes on my userform ("Userform") chk1, chk2, and chk3. I would like to record the name(s) of the checked checkbox(es) in a dynamic array ("MyArray")

For some reason my current code below doesn't recognise that the checkbox has been checked. It is also interesting to note that the ".Value" method for ctrlDummy does not show up when typing the code...maybe this could be the reason

Could you please help me fix this error

----------------------------------------------------------
Sub ChkBox(

Dim ctrlDummy As msforms.Contro
Dim MyArray() As String
Dim i as Intege

For Each ctrlDummy In Userform.Control

If TypeOf ctrlDummy Is msforms.CheckBox The

If ctrlDummy.Value The

MyArray(i) = ctrlDummy.Nam

i = i +

End I

End I

Next ctrlDumm

ReDim MyArray(i

End Su
----------------------------------------------------------

Thanks very much for your help

SuperJas.