View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Toby Erkson[_3_] Toby Erkson[_3_] is offline
external usenet poster
 
Posts: 24
Default VB way to remove the query from a Query Table?

I have a workbook that uses a Query Table. When they click on a button the
workbook is saved, minus various commandbuttons, their VB code, and the
Workbook_Open code (thank you Chip Pearson website!). I also want to make
sure that the Query Table now becomes static, that it does NOT update.

I tried using the macro recorder to capture the code necessary to remove the
Query Table property of the dataset but that was a bust. I do have the
following code that successfully keeps the Query Table from updating itself in
the static workbook:
Sheets("sheetname").QueryTables("querytablename"). EnableRefresh = False

Is there a VB way to basically clear the "Save query definition" checkbox in
the "External Data Range Properties" window of a Query Table?

Thanks
--
Toby Erkson
Oregon, USA
Excel 2002 & 2003 in Windows XP