Mostrar formulario
Publicado por Carlos (13 intervenciones) el 04/09/2003 16:54:43
Hola: tengo un programa que lee un archivo de texto. Si este archivo tiene datos hago un proceso y salgo, de lo contrario debo mostrar el formulario para que se ingresen los datos. Con el código (más abajo) el formulario no me aparece. Pueden darme una pista?? Gracias
Private Sub Form_Load()
Dim Destinos As String
Dim DestinadoA As String
Open "C:\Temp\ListaDes.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, Destinos
DestinadoA = Destinos
Loop
Close #1
If DestinadoA <> "" Then
GenerarPlanilla cd.FileName
End If
' Si no existe el destinatario, debe salir formulario
If DestinadoA = "" Then
If txtDestinadoA.Text = "" Then
MsgBox "No se informo un destinatario. Se cancela el proceso",
vbOKOnly, "Atención"
Unload Me
End If
End If
End Sub
Private Sub Form_Load()
Dim Destinos As String
Dim DestinadoA As String
Open "C:\Temp\ListaDes.txt" For Input As #1
Do While Not EOF(1)
Line Input #1, Destinos
DestinadoA = Destinos
Loop
Close #1
If DestinadoA <> "" Then
GenerarPlanilla cd.FileName
End If
' Si no existe el destinatario, debe salir formulario
If DestinadoA = "" Then
If txtDestinadoA.Text = "" Then
MsgBox "No se informo un destinatario. Se cancela el proceso",
vbOKOnly, "Atención"
Unload Me
End If
End If
End Sub
Valora esta pregunta


0