excel - How to Identify to check if Another workbook is already open -


currently opening workbook using task manager, time previous task not completed i.e. still macro running of workbook, here wan check if other workbook open or running macro; close current opened workbook task manager, have simple code per below want try else:

if thisworkbook.name <> activeworkbook.name call sendemail ' don't need code  else  call run_dashboard  end if 

dim wb workbook on error resume next                       '//this vba way of saying "try"' set wb = application.workbooks(wbookname) if err.number = 9                     '//this vba way of saying "catch"'     'the file not opened...' end if 

Comments

Popular posts from this blog

java - Run spring boot application error: Cannot instantiate interface org.springframework.context.ApplicationListener -

reactjs - React router and this.props.children - how to pass state to this.props.children -

Excel VBA "Microsoft Windows Common Controls 6.0 (SP6)" Location Changes -