Visual Basic - Crear una funcion para muchos Text Box

Life is soft - evento anual de software empresarial
 
Vista:

Crear una funcion para muchos Text Box

Publicado por Juan David Suarez (1 intervención) el 26/02/2001 18:34:47
Necesito saber como se crea o saber si es posible crear una funcion que me trabaje en varios text, por ejemplo, yo creo una funcion que se llama PresionarEnter, y cuando la vaya a utilizar solo le diga PresionarEnter(text1).

La persona que me pueda responer la pregunta muchas gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder

RE:Crear una funcion para muchos Text Box

Publicado por José Luis (54 intervenciones) el 26/02/2001 19:51:18
Hazle referencia cuando llames a la funcion como control ...

Function PresionarEnter(myTEXT as control)
las instrucciones que quieras pero haces referencia a myTEXT como cualquier Text ...

Ejemplo ...

Colocar_Fecha1 Frame5, Me, Me.ActiveControl, Text16

Function Colocar_Fecha1(w As Control, X As Form, Y As Control, z As Control)
'Colocar fecha con frames
If Not IsDate(z) Or Len(Trim(z)) = 0 Then
FFecha.MonthView1.Value = Date
z = ""
Else
FFecha.MonthView1.Value = z
End If
MiFecha = ""
FFecha.Left = X.Left + Y.Left + MDIForm1.Left + 142 + w.Left
FFecha.Top = X.Top + Y.Top + MDIForm1.Top + 997 + w.Top
FFecha.Show 1
If MiFecha <> "" Then
z = MiFecha
End If
End Function

Salu2
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar