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
Post a Comment