Voltando ao tópico de relação de option com check q eu tava fazendo, eu queria fazer uma rotina q executasse o save settings em 30 variaveis pra cada check box q eu tenho, como eu fiz os check box em index ele vai de 1 a 30 e o código ficou assim:
Private Sub_Save()
If Option1 = True Then
SaveSetting App.EXEName, "opt1", "c", Me.Check1(c).Value
Else
End If
If Option2 = True Then
SaveSetting App.EXEName, "opt2", "c", Me.Check1(c).Value
Else
End If
If Option3 = True Then
SaveSetting App.EXEName, "opt3", "c", Me.Check1(c).Value
End If
If Option4 = True Then
SaveSetting App.EXEName, "opt4", "c", Me.Check1(c).Value
End If
If Option5 = True Then
SaveSetting App.EXEName, "opt5", "c", Me.Check1(c).Value
End If
If Option6 = True Then
SaveSetting App.EXEName, "opt6", "c", Me.Check1(c).Value
End If
If Option7 = True Then
SaveSetting App.EXEName, "opt7", "c", Me.Check1(c).Value
End If
If Option8 = True Then
SaveSetting App.EXEName, "opt8", "c", Me.Check1(c).Value
End If
If Option9 = True Then
SaveSetting App.EXEName, "opt9", "c", Me.Check1(c).Value
End If
If Option10 = True Then
SaveSetting App.EXEName, "opt10", "c", Me.Check1(c).Value
End If
If Option11 = True Then
SaveSetting App.EXEName, "opt11", "c", Me.Check1(c).Value
End If
If Option12 = True Then
SaveSetting App.EXEName, "opt12", "c", Me.Check1(c).Value
End If
If Option13 = True Then
SaveSetting App.EXEName, "opt13", "c", Me.Check1(c).Value
End If
If Option14 = True Then
SaveSetting App.EXEName, "opt14", "c", Me.Check1(c).Value
End If
If Option15 = True Then
SaveSetting App.EXEName, "opt15", "c", Me.Check1(c).Value
End If
If Option16 = True Then
SaveSetting App.EXEName, "opt16", "c", Me.Check1(c).Value
End If
If Option17 = True Then
SaveSetting App.EXEName, "opt17", "c", Me.Check1(c).Value
End If
If Option18 = True Then
SaveSetting App.EXEName, "opt18", "c", Me.Check1(c).Value
End If
If Option19 = True Then
SaveSetting App.EXEName, "opt19", "c", Me.Check1(c).Value
End If
If Option20 = True Then
SaveSetting App.EXEName, "opt20", "c", Me.Check1(c).Value
End If
If Option21 = True Then
SaveSetting App.EXEName, "opt21", "c", Me.Check1(c).Value
End If
If Option22 = True Then
SaveSetting App.EXEName, "opt22", "c", Me.Check1(c).Value
End If
If Option23 = True Then
SaveSetting App.EXEName, "opt23", "c", Me.Check1(c).Value
End If
If Option24 = True Then
SaveSetting App.EXEName, "opt24", "c", Me.Check1(c).Value
End If
If Option25 = True Then
SaveSetting App.EXEName, "opt25", "c", Me.Check1(c).Value
End If
If Option26 = True Then
SaveSetting App.EXEName, "opt26", "c", Me.Check1(c).Value
End If
If Option27 = True Then
SaveSetting App.EXEName, "opt27", "c", Me.Check1(c).Value
End If
If Option28 = True Then
SaveSetting App.EXEName, "opt28", "c", Me.Check1(c).Value
End If
If Option29 = True Then
SaveSetting App.EXEName, "opt29", "c", Me.Check1(c).Value
End If
If Option30 = True Then
SaveSetting App.EXEName, "opt30", "c", Me.Check1(c).Value
End If
End Sub
Private Sub Check1_Click(c As Integer)
Select Case c
Case Is = 1
If Check1(1).Value = 1 Then
Form2.Text1.Visible = True
Form2.Text2.Visible = True
Form2.Text3.Visible = True
Else
Form2.Text1.Visible = False
Form2.Text2.Visible = False
Form2.Text3.Visible = False
End If
Call Save
Case Is = 2
Call Save
Case Is = 3
Call Save
Case Is = 4
Call Save
Case Is = 5
Call Save
Case Is = 6
Call Save
Case Is = 7
Call Save
Case Is = 8
Call Save
Case Is = 9
Call Save
Case Is = 10
Call Save
Case Is = 11
Call Save
Case Is = 12
Call Save
Case Is = 13
Call Save
Case Is = 14
Call Save
Case Is = 15
Call Save
Case Is = 16
Call Save
Case Is = 17
Call Save
Case Is = 18
Call Save
Case Is = 19
Call Save
Case Is = 20
Call Save
Case Is = 21
Call Save
Case Is = 22
Call Save
Case Is = 23
Call Save
Case Is = 24
Call Save
Case Is = 25
Call Save
Case Is = 26
Call Save
Case Is = 27
Call Save
Case Is = 28
Call Save
Case Is = 29
Call Save
Case Is = 30
Call Save
End Select
End Sub
bom eu queria saber em q eu to errando, pois quando eu rodo e clico no check box ele fala q a funcao ou sub não esta definida...me ajudem!
Pergunta
Burn Killer
Fala gnt,
Voltando ao tópico de relação de option com check q eu tava fazendo, eu queria fazer uma rotina q executasse o save settings em 30 variaveis pra cada check box q eu tenho, como eu fiz os check box em index ele vai de 1 a 30 e o código ficou assim:
bom eu queria saber em q eu to errando, pois quando eu rodo e clico no check box ele fala q a funcao ou sub não esta definida...me ajudem!
[]'s
Link para o comentário
Compartilhar em outros sites
16 respostass a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.