excel - Check spreadsheet "X.xls" is open? -


is there simple way check whether particularly-named spreadsheet open in current excel session, vba?

       dim wbook workbook               'check summary worksheet available update.  on error goto errhandler             set wbook = workbooks("committedsummary.xls")                 if wbook nothing          msgbox("not open")             else 'it open                 msgbox("the 'committedsummary.xls' workbook in use ,                  cannot updated.  please try again when workbook available", _                  vbcritical, "committed request edit") : exit sub                end if      errhandler: msgbox("workbooks open"):exit sub 

Comments

Popular posts from this blog

android - Why am I getting the message 'Youractivity.java is not an activity subclass or alias' -

python - How do I create a list index that loops through integers in another list -

c# - “System.Security.Cryptography.CryptographicException: Keyset does not exist” when reading private key from remote machine -