Need to email a workbook but without the queries

Monsignor

Board Regular
Joined
May 30, 2011
Messages
162
Is there a standard practice for preparing and sending workbooks so that the recipient can't dig around in the queries? My initial thought is to just delete the queries because the static result is the objective. My concerns:

1. Forgetting to delete the queries, and sending the file off.
2. This is something that'll be done on a regular basis. So, deleting 10 queries each time would get old, fast.

What might be some ways to simplify this?
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.

ranman256

Well-known Member
Joined
Jun 17, 2014
Messages
2,210
as part of the 'Saving' process, the macro would:
delete all queries,
save As to a file w their name in it.
email said file.
 

macfuller

Active Member
Joined
Apr 30, 2014
Messages
309
Office Version
  1. 365
Platform
  1. Windows
A macro will work if you have Excel 2016 and thus the queries are part of the data model. Rather than exporting the queries I suggest saving a copy first, then delete the queries in the copy, email the copy, and delete the copy (to avoid confusion the next time).

If you have Excel 2013 I don't see an automated possibility. I don't know if the schema tables that you can read for information about the queries allow deletion.
 

Forum statistics

Threads
1,181,057
Messages
5,927,875
Members
436,574
Latest member
Bosniain

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
Top