codice:Sub Controllo Dim Comando As Control Dim i As Integer Dim j As Integer For Each Comando In Me If TypeOf Comando Is OptionButton Then '*** Tutto il successivo select si potrebbe '*** sostituire con '*** j=val(right$(Comando.Name),1) '*** ma per pulizia di '*** programmazione preferisco il select... Select Case Comando.Name Case Is = "optCh1" j = 1 Case Is = "optCh2" j = 2 Case Is = "optCh3" j = 3 Case Is = "optCh4" j = 2 Case Else Exit Sub End Select '**** Fino a qui i = Comando.Index Select Case i Case 1 Scala(j) = 225 / 30 Case 2 Scala(j) = 225 / 15 Case 3 Scala(j) = 225 / 6 Case 4 Scala(j) = 225 / 3 End Select End If Next End Sub

Rispondi quotando