View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
GS[_2_] GS[_2_] is offline
external usenet poster
 
Posts: 3,514
Default Taking control from Option Button into RefEdit in Excel 2010 behaving oddly

Oops! Forgot to convert type...
Private Sub opt1_Click()
With Me.RefEdit1
.Enabled = True: .SetFocus
End With


Call SetCtrlState(Ndx:=CLng(Me.opt1.Tag))

End Sub


...since the Tag is text. Optionally, you could avoid the conversion as
follows:

Sub SetCtrlState(Ndx$)
Select Case Ndx
Case "1":
Case "2":
Case "3":
End Select 'Case Ndx
End Sub

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion



---
This email is free from viruses and malware because avast! Antivirus protection is active.
http://www.avast.com