Probando código
Publicado por Blas (13 intervenciones) el 12/09/2016 21:55:38
Hola genios !!
Estoy probando mi código.
Lo coloque en VBA de Word, ya que actua según lo que realice en mi documento de Word.
En este paso, coloque tres grupos de opciones con otros controles
Guardia Principal:
OPTIONBUTTON "SI",
OPTIONBUTTON "NO"
OPTIONBUTTON "PARCIALMENTE"
LABEL para texto
TEXTBOX_NO
TEXTBOX_PARCIALMENTE
Jardín maternal:
OPTIONBUTTON "SI",
OPTIONBUTTON "NO"
OPTIONBUTTON "PARCIALMENTE"
LABEL para texto
TEXTBOX_NO
TEXTBOX_PARCIALMENTE
Luminarias:
OPTIONBUTTON "SI",
OPTIONBUTTON "NO"
OPTIONBUTTON "PARCIALMENTE"
LABEL para texto
TEXTBOX_NO
TEXTBOX_PARCIALMENTE
cuando en mi documento activo el OP "SI" el LABEL correspondiente queda vacio ("") y ambos TEXTBOX en gris o Me gustaría que no se vean.
cuando activo el OP "NO" el Label correspondiente muestra "Cantidad Requerida", su TEXBOX_NO debe aparecer y esperar texto, mientras que el TEXTBOX_PARCIALMENTE debe quedar grisado o desaparecer.
Cuando activo el OP "PARCIALEMENTE" el LABEL correspondiente muestra "Cantidad Adicional" y el TEXTBOX_NO debería desaparecer mientras el TEXTBOX_PARCIALMENTE espera el texto.
Asi quiero que funcione,
puse la función CALL en cada evento click de los controles optionbutton pero me sale todo mal.
El procedimiento al que llaman mis click es
espero sus sugerencias !!!
Gracias genios
Estoy probando mi código.
Lo coloque en VBA de Word, ya que actua según lo que realice en mi documento de Word.
En este paso, coloque tres grupos de opciones con otros controles
Guardia Principal:
OPTIONBUTTON "SI",
OPTIONBUTTON "NO"
OPTIONBUTTON "PARCIALMENTE"
LABEL para texto
TEXTBOX_NO
TEXTBOX_PARCIALMENTE
Jardín maternal:
OPTIONBUTTON "SI",
OPTIONBUTTON "NO"
OPTIONBUTTON "PARCIALMENTE"
LABEL para texto
TEXTBOX_NO
TEXTBOX_PARCIALMENTE
Luminarias:
OPTIONBUTTON "SI",
OPTIONBUTTON "NO"
OPTIONBUTTON "PARCIALMENTE"
LABEL para texto
TEXTBOX_NO
TEXTBOX_PARCIALMENTE
cuando en mi documento activo el OP "SI" el LABEL correspondiente queda vacio ("") y ambos TEXTBOX en gris o Me gustaría que no se vean.
cuando activo el OP "NO" el Label correspondiente muestra "Cantidad Requerida", su TEXBOX_NO debe aparecer y esperar texto, mientras que el TEXTBOX_PARCIALMENTE debe quedar grisado o desaparecer.
Cuando activo el OP "PARCIALEMENTE" el LABEL correspondiente muestra "Cantidad Adicional" y el TEXTBOX_NO debería desaparecer mientras el TEXTBOX_PARCIALMENTE espera el texto.
Asi quiero que funcione,
puse la función CALL en cada evento click de los controles optionbutton pero me sale todo mal.
El procedimiento al que llaman mis click es
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
Private Sub controles_PERSONAL_EJECUCION()
' Controlo que se habiliten o deshabiliten los controles textboxPERSONAL_EJECUCION de los grupos
' PERSONAL_EJECUCION segun corresponda y que según se cumpla la condición en su OptionButton
' active controles o cambie textos
GRUPO_PERSONAL_EJECUCION_GP:
If OptionButtonPERSONAL_EJECUCION_SI_GP.Value = True Then
LabelPERSONAL_EJECUCION_GP.Caption = ""
TextBoxPERSONAL_EJECUCION_NO_GP.Value = "------"
TextBoxPERSONAL_EJECUCION_PARCIAL_GP.Value = "------"
Else
If OptionButtonPERSONAL_EJECUCION_NO_GP.Value = True Then
LabelPERSONAL_EJECUCION_GP.Caption = "Cantidad Requerida :"
TextBoxPERSONAL_EJECUCION_NO_GP.Select
TextBoxPERSONAL_EJECUCION_PARCIAL_GP.Value = "<------"
ElseIf OptionButtonPERSONAL_EJECUCION_PARCIAL_GP.Value = True Then
LabelPERSONAL_EJECUCION_GP.Caption = "Cantidad Adicional :"
TextBoxPERSONAL_EJECUCION_NO_GP.Value = "------>"
TextBoxPERSONAL_EJECUCION_PARCIAL_GP.Select
End If
GRUPO_PERSONAL_EJECUCION_JM:
If OptionButtonPERSONAL_EJECUCION_SI_JM.Value = True Then
LabelPERSONAL_EJECUCION_JM.Caption = ""
TextBoxPERSONAL_EJECUCION_NO_JM.Value = "------"
TextBoxPERSONAL_EJECUCION_PARCIAL_JM.Value = "------"
ElseIf OptionButtonPERSONAL_EJECUCION_NO_JM.Value = True Then
LabelPERSONAL_EJECUCION_JM.Caption = "Cantidad Requerida :"
TextBoxPERSONAL_EJECUCION_NO_JM.Select
TextBoxPERSONAL_EJECUCION_PARCIAL_JM.Value = "<-----"
ElseIf OptionButtonPERSONAL_EJECUCION_PARCIAL_JM.Value = True Then
LabelPERSONAL_EJECUCION_JM.Caption = "Cantidad Adicional :"
TextBoxPERSONAL_EJECUCION_NO_JM.Value = "------>"
TextBoxPERSONAL_EJECUCION_PARCIAL_JM.Select
End If
GRUPO_PERSONAL_EJECUCION_LU:
If OptionButtonPERSONAL_EJECUCION_SI_LU.Value = True Then
LabelPERSONAL_EJECUCION_LU.Caption = ""
TextBoxPERSONAL_EJECUCION_NO_LU.Value = "------"
TextBoxPERSONAL_EJECUCION_PARCIAL_LU.Value = "------"
ElseIf OptionButtonPERSONAL_EJECUCION_NO_LU.Value = True Then
LabelPERSONAL_EJECUCION_LU.Caption = "Cantidad Requerida :"
TextBoxPERSONAL_EJECUCION_NO_LU.Select
TextBoxPERSONAL_EJECUCION_PARCIAL_LU.Value = "<------"
ElseIf OptionButtonPERSONAL_EJECUCION_PARCIAL_LU.Value = True Then
LabelPERSONAL_EJECUCION_LU.Caption = "Cantidad Adicional :"
TextBoxPERSONAL_EJECUCION_NO_LU.Value = "------>"
TextBoxPERSONAL_EJECUCION_PARCIAL_LU.Select
End If
End If
End Sub
espero sus sugerencias !!!
Gracias genios
Valora esta pregunta


0