View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
salut salut is offline
external usenet poster
 
Posts: 31
Default ControlButtons in a UserForm

I have the following code to get values from OptionButtons. The problem is,
seems that the code "TypeOf ctl is OptioinButton" always has value "False"
even when ctl is an OptionButton. Could anybody tell me what did I do wrong
in the code? Thanks a lot!
----------------------------------------------------------------------------
for each ctrl in form1
If TypeOf ctl Is OptionButton Then
If ctl.Value = -1 Then
Total = Total + CInt(ctl.Tag)
End If
testnumber = 1
Else
End If
next
------------------------------------------------------------------------------------