Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Tell  if  an  Excel  Workbook  is  Open  and  If  It  Isnt  Open  It  

 Content of Tell if an Excel Workbook is Open and If It Isnt Open It.vbs
MD5 Hash: BA42A81EC62BCBB19063CA2F0080CBA6
Set objShell = CreateObject("Wscript.Shell")

Set objWord = CreateObject("Word.Application")
Set colTasks = objWord.Tasks
i = 0

For Each objTask in colTasks
strName = LCase(objTask.Name)
If Instr(strName, "inventory.xls") Then
i = 1
End If
Next

strCmdLine = "excel.exe " & chr(34) & "C:\Scripts\Inventory.xls" & chr(34)

If i = 0 Then
objShell.Run strCmdLine, 3
End If

objWord.Quit



   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a