I currently have code in Excel VBA that pulls data from Access in my Excel
worksheet. However, it runs about 10 times faster if Access is already open.
And (I'm not sure of this), I think it helps if an Access query is open and
in design view.

Can I have the code to:
1. Open Access database XXXX.mdb, if it is not already open
2. Open the query YYYY in design view
3. Ensure that the Excel worksheet is still active

Hope this isn't a big ask - thanks very much in advance

regards
Daniel Bonallack