
¿Como cerrar varios Internet Explorers?
Publicado por Adolfo (117 intervenciones) el 18/10/2002 23:44:04
Tengo el siguiente código para cerrar el Internet Explorer:
Private Sub Command1_Click()
Dim winHwnd As Long
Dim RetVal As Long
winHwnd = FindWindow("IEFrame", vbNullString)
If winHwnd <> 0 Then
RetVal = PostMessage(winHwnd, WM_CLOSE, 0&, 0&)
If RetVal = 0 Then
MsgBox "Error al enviar el mensaje."
End If
Else
MsgBox "El Internet Explorer no está abierto."
End If
End Sub
Pero sólo me cierra 1 Internet explorer, ¿Como puedo hacer para que me cierre varios?
Gracias.
Private Sub Command1_Click()
Dim winHwnd As Long
Dim RetVal As Long
winHwnd = FindWindow("IEFrame", vbNullString)
If winHwnd <> 0 Then
RetVal = PostMessage(winHwnd, WM_CLOSE, 0&, 0&)
If RetVal = 0 Then
MsgBox "Error al enviar el mensaje."
End If
Else
MsgBox "El Internet Explorer no está abierto."
End If
End Sub
Pero sólo me cierra 1 Internet explorer, ¿Como puedo hacer para que me cierre varios?
Gracias.
Valora esta pregunta


0