PDA

View Full Version : Refresh DB Connection Programatically



paulked
12-04-2017, 01:31 PM
Cross posted here https://forums.mysql.com/read.php?172,662885,662885#msg-662885

Hi

I've installed MySQL for Excel and loaded some tables into a workbook. I want to hide these tables from the end-user so I need to refresh them from VBA. I can refresh them with the mouse by either right clicking on the table and selecting 'Refresh' or from the Refresh button under the Data option on the Ribbon.

I've no idea how MySQL for Excel is communicating with the DB, because the connections it has made won't reconnect when I try to manually refresh them, or set them to automatically update every 1min. Yet they will update with the mouse clicks!

I'm doing it with MouseClick and SendKeys just to get me by for now, but am far from happy with that!

Any ideas?

Thanks

Paul Ked

SamT
12-07-2017, 12:26 PM
Have you recorded a macro yet?