MrExcel Message Board


Go Back   MrExcel Message Board > Question Forums > Excel Questions

Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old Mar 30th, 2004, 03:31 PM   #1
LAS
 
Join Date: Oct 2002
Posts: 214
Default Sql on closing Excel

I am runing an update query from excel to a sql database.

The query runs correctly when run BUT,

I also run the query when the workbook closes. At that point I get the following Excel message:
'The action will cancel a pending Refresh Data Command. Continue?'

If select OK the query does not complete, nor does it run if I cancel.

Any ideas how to stop excel from closing the workbook until the query / code has finished running?

Thanks fro your help.
__________________
Regards

Lawrence Swartz
www.file-man.com
LAS is offline   Reply With Quote
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT +1. The time now is 07:00 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
All contents Copyright 1998-2009 by MrExcel Consulting.