Private Sub Opt_Click(Index As Integer) Me.Caption = Index & "/" & GetSelected(Opt) End Sub Private Function GetSelected(ByRef ptOpt As Object) As Long Dim i As Long Dim lValue As Boolean On Local Error Resume Next For i = 0 To ptOpt.Count lValue = ptOpt(i).Value If lValue Then GetSelected = i Exit Function End If Next i GetSelected = -1 End Function
Public Function Public Function BH_SelectedOptions(OptionsGroup As Object) As Integer Dim optB As MSForms.OptionButton For Each optB In OptionsGroup If optB.Value Then BH_SelectedOptions = optB.Index Exit Function End If Next BH_SelectedOptions = -1 End Function
Private Sub check(Optionbuttons()) End Sub
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question