I'm using a 'ShellandWait' routine to launch a connection to a remote server and SFTP some files. The connection and download are working fine. The routine, however, is started automatically as a Workbook Open event within a workbook that is opened as a scheduled task. What I would like to do is offer the user the ability to open the workbook manually without starting the 'ShellandWait' routine. I don't want to use a msgbox because under normal circumstances the workbook is a scheduled task and can't wait for a user response (unless there is a way to automatically answer 'OK' to the msgbox.

Something like offering the user (via the status bar) the opportunity to hit the 'ESC' key during a preset wait period (e.gf. 10 secs) before the 'ShellandWait' is executed would be fine, unless there is a better way.

I've tried different code but can't capture pressing the 'ESC' key without interrupting the code and causing a non-graceful abort. Is there a way to capture it so that I can control how the routine exits?

Thanks.