D
darius
Hi
Extreme newbie here. I don't know why I'm getting a type mismatch error
on this function
Private Function opt_to_text(acol As Integer) As String ' <-- error here
Dim optCheck As MSForms.OptionButton
For x = acol To acol + 3
Set optCheck = "OptionButton" & CStr(x)
If optCheck.Value = True Then
opt_to_text = optCheck.Caption
End If
Next x
End Function
msgbox(opt_to_text(1))
thanks
Extreme newbie here. I don't know why I'm getting a type mismatch error
on this function
Private Function opt_to_text(acol As Integer) As String ' <-- error here
Dim optCheck As MSForms.OptionButton
For x = acol To acol + 3
Set optCheck = "OptionButton" & CStr(x)
If optCheck.Value = True Then
opt_to_text = optCheck.Caption
End If
Next x
End Function
msgbox(opt_to_text(1))
thanks