Cette action est irreversible, confirmez la suppression du commentaire ?
Signaler le commentaire
Veuillez sélectionner un problème
Nudité
Violence
Harcèlement
Fraude
Vente illégale
Discours haineux
Terrorisme
Autre
lemra
Rebonjour,
En me relisant, je me suis apercu que dans mon exemple, la gestion de "indic " était farfelu indic = 00 do while indic = 00 Application.Wait(Now + TimeValue("0:01:00")) "si toto.txt rempli" alors indic Loop
indic = 00 do while indic = 99 Application.Wait(Now + TimeValue("0:01:00")) "si toto.txt rempli" alors indic l Loop ... Suite vba
celà marche bien
Il me reste qu'un "petit probleme", comment fermer la fenetre dans "suite VBA"
Par avance, merci
Rebonjour,
En me relisant, je me suis apercu que dans mon exemple, la gestion de
"indic " était farfelu
indic = 00
do while indic = 00
Application.Wait(Now + TimeValue("0:01:00"))
"si toto.txt rempli" alors indic
Loop
indic = 00
do while indic = 99
Application.Wait(Now + TimeValue("0:01:00"))
"si toto.txt rempli" alors indic l
Loop
...
Suite vba
celà marche bien
Il me reste qu'un "petit probleme", comment fermer la fenetre dans "suite
VBA"
En me relisant, je me suis apercu que dans mon exemple, la gestion de "indic " était farfelu indic = 00 do while indic = 00 Application.Wait(Now + TimeValue("0:01:00")) "si toto.txt rempli" alors indic Loop
indic = 00 do while indic = 99 Application.Wait(Now + TimeValue("0:01:00")) "si toto.txt rempli" alors indic l Loop ... Suite vba
celà marche bien
Il me reste qu'un "petit probleme", comment fermer la fenetre dans "suite VBA"
Par avance, merci
Jean-François Aubert
Salut lemra,
Peut-être, peux-tu t'inspirer de cette proc, que j'utilise pour visionner des images au moyen de IE: '************************* Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _ (ByVal HWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Const WM_CLOSE = &H10 Public Const WM_DESTROY = &H2 ' ok pour aperçu de l'image Public Const WM_NCDESTROY = &H82 ' ok pour IE
Sub CloseWindow(quoi) 'd'après Chip Pearson, mpep 'certains programmes (comme la calculatrice Windows) se ferment 'avec un message WM_CLOSE
Dim HWnd As Long HWnd = FindWindow(vbNullString, quoi) If HWnd > 0 Then SendMessage HWnd, WM_NCDESTROY, 0, 0 End If End Sub '........................................... Sub diaporama() ' jfa Dim i, quoi For i = 2 To Sheets("lien_imageSat").Range("A65536").End(xlUp).Row Application.WindowState = xlMaximized quoi = Sheets("lien_imageSat").Cells(i, 1) ActiveWorkbook.FollowHyperlink quoi Application.Wait Now + (2 / 86400) quoi = quoi & " - Microsoft Internet Explorer" CloseWindow (quoi) Next Application.WindowState = xlMaximized End Sub
'****************************
-- Amicalement
Jean-François Aubert {Vaudois de la Côte Lémanique}
"lemra" a écrit dans le message de news:blluta$d8s$
Bonjour à toutes et à tous,
Mon petit probleme :
1) Je lance un programme php via :
rc = Shell("COMMAND.COM /C c:...IEXPLORER.EXE toto.php") celà marche bien
Je sais quand le pgm php est terminé :
- Avant 1) j'ai crée un fichier zz.txt vide - dans le script php, je mets une ligne dans zz.txt - apres le lancement de 1) dans vba je boucle sur ;
indic = 00 do while indic = 99 Application.Wait(Now + TimeValue("0:01:00")) "si toto.txt rempli" alors indic l Loop ... Suite vba
celà marche bien
Il me reste qu'un "petit probleme", comment fermer la fenetre dans "suite VBA"
Par avance, merci
Armel FRANCOIS
Salut lemra,
Peut-être, peux-tu t'inspirer de cette proc,
que j'utilise pour visionner des images au moyen de IE:
'*************************
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal HWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Const WM_CLOSE = &H10
Public Const WM_DESTROY = &H2 ' ok pour aperçu de l'image
Public Const WM_NCDESTROY = &H82 ' ok pour IE
Sub CloseWindow(quoi)
'd'après Chip Pearson, mpep
'certains programmes (comme la calculatrice Windows) se ferment
'avec un message WM_CLOSE
Dim HWnd As Long
HWnd = FindWindow(vbNullString, quoi)
If HWnd > 0 Then
SendMessage HWnd, WM_NCDESTROY, 0, 0
End If
End Sub
'...........................................
Sub diaporama() ' jfa
Dim i, quoi
For i = 2 To Sheets("lien_imageSat").Range("A65536").End(xlUp).Row
Application.WindowState = xlMaximized
quoi = Sheets("lien_imageSat").Cells(i, 1)
ActiveWorkbook.FollowHyperlink quoi
Application.Wait Now + (2 / 86400)
quoi = quoi & " - Microsoft Internet Explorer"
CloseWindow (quoi)
Next
Application.WindowState = xlMaximized
End Sub
'****************************
--
Amicalement
Jean-François Aubert
{Vaudois de la Côte Lémanique}
"lemra" <armel.francois_antiiii_spam@wanadoo.fr> a écrit dans le message de
news:blluta$d8s$1@news-reader1.wanadoo.fr...
Bonjour à toutes et à tous,
Mon petit probleme :
1) Je lance un programme php via :
rc = Shell("COMMAND.COM /C c:...IEXPLORER.EXE toto.php")
celà marche bien
Je sais quand le pgm php est terminé :
- Avant 1) j'ai crée un fichier zz.txt vide
- dans le script php, je mets une ligne dans zz.txt
- apres le lancement de 1) dans vba
je boucle sur ;
indic = 00
do while indic = 99
Application.Wait(Now + TimeValue("0:01:00"))
"si toto.txt rempli" alors indic l
Loop
...
Suite vba
celà marche bien
Il me reste qu'un "petit probleme", comment fermer la fenetre dans "suite
VBA"
Peut-être, peux-tu t'inspirer de cette proc, que j'utilise pour visionner des images au moyen de IE: '************************* Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _ (ByVal HWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Const WM_CLOSE = &H10 Public Const WM_DESTROY = &H2 ' ok pour aperçu de l'image Public Const WM_NCDESTROY = &H82 ' ok pour IE
Sub CloseWindow(quoi) 'd'après Chip Pearson, mpep 'certains programmes (comme la calculatrice Windows) se ferment 'avec un message WM_CLOSE
Dim HWnd As Long HWnd = FindWindow(vbNullString, quoi) If HWnd > 0 Then SendMessage HWnd, WM_NCDESTROY, 0, 0 End If End Sub '........................................... Sub diaporama() ' jfa Dim i, quoi For i = 2 To Sheets("lien_imageSat").Range("A65536").End(xlUp).Row Application.WindowState = xlMaximized quoi = Sheets("lien_imageSat").Cells(i, 1) ActiveWorkbook.FollowHyperlink quoi Application.Wait Now + (2 / 86400) quoi = quoi & " - Microsoft Internet Explorer" CloseWindow (quoi) Next Application.WindowState = xlMaximized End Sub
'****************************
-- Amicalement
Jean-François Aubert {Vaudois de la Côte Lémanique}
"lemra" a écrit dans le message de news:blluta$d8s$
Bonjour à toutes et à tous,
Mon petit probleme :
1) Je lance un programme php via :
rc = Shell("COMMAND.COM /C c:...IEXPLORER.EXE toto.php") celà marche bien
Je sais quand le pgm php est terminé :
- Avant 1) j'ai crée un fichier zz.txt vide - dans le script php, je mets une ligne dans zz.txt - apres le lancement de 1) dans vba je boucle sur ;
indic = 00 do while indic = 99 Application.Wait(Now + TimeValue("0:01:00")) "si toto.txt rempli" alors indic l Loop ... Suite vba
celà marche bien
Il me reste qu'un "petit probleme", comment fermer la fenetre dans "suite VBA"
Par avance, merci
Armel FRANCOIS
lemra
Merci beaucoup,
Celà marche tres bien.
Pour faire gagner du temps à d 'eventuelles personnes interessées , j'ai isolé le mini c'est à dire via VBA fermer une fenetre window.
En reprenant ton modele, pour "quoi", il faut mettre ce que l'on voit dans le gestionnaire de taches windows. Dans mon cas : quoi = "Wanadoo - Microsoft Internet Explorer"
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _ (ByVal HWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Const WM_CLOSE = &H10 Public Const WM_NCDESTROY = &H82 ' ok pour IE
Sub CloseWindow(quoi) 'd'après Chip Pearson, mpep 'certains programmes (comme la calculatrice Windows) se ferment 'avec un message WM_CLOSE
Dim HWnd As Long HWnd = FindWindow(vbNullString, quoi) If HWnd > 0 Then SendMessage HWnd, WM_NCDESTROY, 0, 0 Else MsgBox ("pas de " &quoi) End If End Sub
Sub zz() Application.WindowState = xlMaximized quoi = ("Wanadoo - Microsoft Internet Explorer") CloseWindow (quoi) End Sub
Merci beaucoup,
Celà marche tres bien.
Pour faire gagner du temps à d 'eventuelles personnes interessées , j'ai
isolé le mini
c'est à dire via VBA fermer une fenetre window.
En reprenant ton modele, pour "quoi", il faut mettre ce que l'on voit dans
le gestionnaire de taches windows.
Dans mon cas :
quoi = "Wanadoo - Microsoft Internet Explorer"
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _
(ByVal HWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As
Any) As Long
Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
(ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Const WM_CLOSE = &H10
Public Const WM_NCDESTROY = &H82 ' ok pour IE
Sub CloseWindow(quoi)
'd'après Chip Pearson, mpep
'certains programmes (comme la calculatrice Windows) se ferment
'avec un message WM_CLOSE
Dim HWnd As Long
HWnd = FindWindow(vbNullString, quoi)
If HWnd > 0 Then
SendMessage HWnd, WM_NCDESTROY, 0, 0
Else
MsgBox ("pas de " &quoi)
End If
End Sub
Sub zz()
Application.WindowState = xlMaximized
quoi = ("Wanadoo - Microsoft Internet Explorer")
CloseWindow (quoi)
End Sub
Pour faire gagner du temps à d 'eventuelles personnes interessées , j'ai isolé le mini c'est à dire via VBA fermer une fenetre window.
En reprenant ton modele, pour "quoi", il faut mettre ce que l'on voit dans le gestionnaire de taches windows. Dans mon cas : quoi = "Wanadoo - Microsoft Internet Explorer"
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" _ (ByVal HWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long Public Declare Function FindWindow Lib "user32" Alias "FindWindowA" _ (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Public Const WM_CLOSE = &H10 Public Const WM_NCDESTROY = &H82 ' ok pour IE
Sub CloseWindow(quoi) 'd'après Chip Pearson, mpep 'certains programmes (comme la calculatrice Windows) se ferment 'avec un message WM_CLOSE
Dim HWnd As Long HWnd = FindWindow(vbNullString, quoi) If HWnd > 0 Then SendMessage HWnd, WM_NCDESTROY, 0, 0 Else MsgBox ("pas de " &quoi) End If End Sub
Sub zz() Application.WindowState = xlMaximized quoi = ("Wanadoo - Microsoft Internet Explorer") CloseWindow (quoi) End Sub