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

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -