PDA

View Full Version : Refresh connection then close



CuriousGeorg
10-08-2015, 02:26 AM
Hi,

I have a userform that refreshes data from Access. however it leaves the connection open

"thisworkbook.refreshall."

How do I close the connection after this refresh is complete?

Aflatoon
10-08-2015, 03:51 AM
You need to look at the connection properties. First make sure it doesn't refresh in the background - otherwise your code will carry on while the refresh is still happening. Second, make sure it's not set to lock the database.