Advertisement
Guest User

Untitled

a guest
Jul 30th, 2014
180
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. Set objShell = CreateObject("Shell.Application")
  2.  
  3. For Each wd In objShell.Windows
  4.  
  5. If InStr(wd.document.Title, "College") = 1 Then
  6. Exit For
  7. End If
  8. Next wd
  9.  
  10. Worksheets("BTS").Cells(2, 2).Value = wd.LocationURL
  11.  
  12. Dim objShell, sTitle, wd
  13.  
  14. Set objShell = CreateObject("Shell.Application")
  15.  
  16. For Each wd In objShell.Windows
  17. sTitle = ""
  18. On Error Resume Next
  19. sTitle = wd.document.Title
  20. On Error Goto 0
  21. If InStr(sTitle, "College") = 1 Then
  22. Exit For
  23. End If
  24. Next wd
  25.  
  26. Worksheets("BTS").Cells(2, 2).Value = wd.LocationURL
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement