EXECUTAR SUB
No Form1 tenho a Sub abaixo:
Private Sub TextBusca_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text1.Text = "Alo Mundo"
End If
End Sub
No Form2 quero executar a Sub acima a partir da Sub abaixo:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Execute a Sub do Form1
End If
End Sub
Isso é possÃvel?
Desde já a gradeço a atenção
Private Sub TextBusca_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Text1.Text = "Alo Mundo"
End If
End Sub
No Form2 quero executar a Sub acima a partir da Sub abaixo:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
Execute a Sub do Form1
End If
End Sub
Isso é possÃvel?
Desde já a gradeço a atenção
No form1 mude Private Sub para Public Sub. No form2 coloque form1.textbusca_keyPressi.
Luiz
Luiz
Faz isso:
No Form1:
No form2:
Ah, se a dúvida foi sanada favor encerrar o tópico. :P
No Form1:
Public Sub RodarKeyPress()
TextBusca_KeyPress (13)
End SubNo form2:
Private Sub Text1_KeyPress(KeyAscii As Integer)
If KeyAscii = 13 Then
RodarKeyPress
End If
End Sub Ah, se a dúvida foi sanada favor encerrar o tópico. :P
Tópico encerrado , respostas não são mais permitidas