Excel VBA Parameterized Query

KG Old Wolf

Board Regular
Joined
Sep 20, 2009
Messages
65
I've created a VBA-based query that uses a worksheet cell value as an input parameter. The query uses an Access database and returns with the desired record(s). It works just fine BUT....I get a new "Connection" listed in my Data - Connections and a new "ExternalData" range name listed in Formula - Name Manager.

Through VBA I create the range name I want and would like to ensure the extraneous connections and ExternalData ranges aren't created.
I assume there are .Member commands that will suppress this but I can't seem to find them.... any pointers will be appreciated.

Thanks
 
I'm not sure I want to debug the recommendation of an unknown MS tech telling us to do something that (apparently) doesn't work. Are you sure you can't just do this the normal way?
 
Upvote 0

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)

Forum statistics

Threads
1,224,530
Messages
6,179,373
Members
452,907
Latest member
Roland Deschain

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top