Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Shell.Application not returning all windows

Shell.Application not returning all windows

Scheduled Pinned Locked Moved Visual Basic
linuxhelpquestion
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Asad Hussain
    wrote on last edited by
    #1

    I wrote a vbscript that closes Internet explorer windows. The main reason i'm doing it this way it to get the LocationURL property of the objIE object before I call Quit on it. The problem is that not all windows close this way. Any suggestions? Set objShell = CreateObject("Shell.Application") Set objShellWindows = objShell.Windows dim i, nCount nCount = objShellWindows.Count nCount = nCount - 1 for i = 0 to nCount dim objIE set objIE = objShellWindows.Item(i) if (not objIE is nothing) then objIE.Quit end if next

    D 1 Reply Last reply
    0
    • A Asad Hussain

      I wrote a vbscript that closes Internet explorer windows. The main reason i'm doing it this way it to get the LocationURL property of the objIE object before I call Quit on it. The problem is that not all windows close this way. Any suggestions? Set objShell = CreateObject("Shell.Application") Set objShellWindows = objShell.Windows dim i, nCount nCount = objShellWindows.Count nCount = nCount - 1 for i = 0 to nCount dim objIE set objIE = objShellWindows.Item(i) if (not objIE is nothing) then objIE.Quit end if next

      D Offline
      D Offline
      Dave Kreskowiak
      wrote on last edited by
      #2

      What do you mean by "not all windows close this way"? Are you talking about close JUST the IE windows or all applications? Also, before you close the IE window, you might want to try checking the .Busy property and wait until the borwser window is finished. I'm not syaing that this will solve the problem, but it might... RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups