Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

ActiveWindow.WindowState

2 réponses
Avatar
isabelle
bonjour voustousse,

j'essai d'agrandir une fenêtre internet explorer via une commande vba,
et je n'y arrive pas. voici le code (xl2002),

Dim IE As Object
Set IE = CreateObject("internetexplorer.application")
IE.Navigate ("https://blabla")
IE.Visible = True
Application.Wait Now + 5 / 3600 / 48
With ActiveWindow
SendKeys ("~")
End With
Application.Wait Now + 5 / 3600 / 48
With ActiveWindow
SendKeys ("zaza~")
End With
Application.Wait Now + 5 / 3600 / 48
IE.Visible = True
ActiveWindow.WindowState = xlMaximized
Set IE = Nothing

merci par avance de votre aide !
isabelle

2 réponses

Avatar
Frédéric Sigonneau
Bonsoir Isabelle,

Tu peux passer par une fonction API pour dimensionner internet explorer en
fonction de la résolution de l'écran de l'utilisateur de ton code :

'====================Úns un module standard
Declare Function GetSystemMetrics32 Lib "user32" _
Alias "GetSystemMetrics" (ByVal nIndex As Long) As Long

Sub test()
Dim IE As Object
Set IE = CreateObject("internetexplorer.application")
IE.Visible = True: IE.Top = 0: IE.Left = 0
IE.Width = GetSystemMetrics32(0)
IE.Height = GetSystemMetrics32(1)
End Sub
'=====================
FS
--
Frédéric Sigonneau [MVP Excel - né un sans-culottide]
Gestions de temps, VBA pour Excel :
http://perso.wanadoo.fr/frederic.sigonneau
Si votre question sur Excel est urgente, évitez ma bal !


bonjour voustousse,

j'essai d'agrandir une fenêtre internet explorer via une commande vba,
et je n'y arrive pas. voici le code (xl2002),

Dim IE As Object
Set IE = CreateObject("internetexplorer.application")
IE.Navigate ("https://blabla")
IE.Visible = True
Application.Wait Now + 5 / 3600 / 48
With ActiveWindow
SendKeys ("~")
End With
Application.Wait Now + 5 / 3600 / 48
With ActiveWindow
SendKeys ("zaza~")
End With
Application.Wait Now + 5 / 3600 / 48
IE.Visible = True
ActiveWindow.WindowState = xlMaximized
Set IE = Nothing

merci par avance de votre aide !
isabelle


Avatar
Frédo P.
Bonjour Isabelle
C'est quoi déjà ce que tu pèche dans ton vaste pays?

Est ce que tu pourrais me tuyauté sur les fichiers d'aide sur xl et leurs
créations, la méthode?
bisou

Fred
"isabelle" a écrit dans le message de
news:
:-)) ha ! ben pour ça la pêche j'connais bien,
bisou
isabelle