Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
External Data Updates
I have an excel template which pulls some data from my SQL server when
opened. I need to set it so that it only pulls up the data when first opened from a template, but not after being saved as an xls file. Any ideas? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
External Data Updates
ActiveSheet.QueryTables(1).Delete
after you refresh the data. -- Regards, Tom Ogilvy <M.Streeks wrote in message ... I have an excel template which pulls some data from my SQL server when opened. I need to set it so that it only pulls up the data when first opened from a template, but not after being saved as an xls file. Any ideas? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
External Data Updates
Thanks for your help - I'm still not sure how to do it though.
Does that get pasted in verbatim? and where exactly do i put it? The code that i use to populate the tables is in a module - i don't program with excel very often, so i don't really know where every thing goes. "Tom Ogilvy" wrote in message ... ActiveSheet.QueryTables(1).Delete after you refresh the data. -- Regards, Tom Ogilvy <M.Streeks wrote in message ... I have an excel template which pulls some data from my SQL server when opened. I need to set it so that it only pulls up the data when first opened from a template, but not after being saved as an xls file. Any ideas? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
External Data Updates
Now i only need to know where to put it.
<M.Streeks wrote in message ... Thanks for your help - I'm still not sure how to do it though. Does that get pasted in verbatim? and where exactly do i put it? The code that i use to populate the tables is in a module - i don't program with excel very often, so i don't really know where every thing goes. "Tom Ogilvy" wrote in message ... ActiveSheet.QueryTables(1).Delete after you refresh the data. -- Regards, Tom Ogilvy <M.Streeks wrote in message ... I have an excel template which pulls some data from my SQL server when opened. I need to set it so that it only pulls up the data when first opened from a template, but not after being saved as an xls file. Any ideas? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
External Data Updates
I would guess either in the open event of the template - you would have to
include code to do the query with backgroundrefresh set to false, the code I gave you to delete the query table on that sheet (this all assumes you are using a querytable). Then possibly save the template as a workbook with a new name. http://www.cpearson.com/excel/events.htm -- Regards, Tom Ogilvy <M.Streeks wrote in message ... Now i only need to know where to put it. <M.Streeks wrote in message ... Thanks for your help - I'm still not sure how to do it though. Does that get pasted in verbatim? and where exactly do i put it? The code that i use to populate the tables is in a module - i don't program with excel very often, so i don't really know where every thing goes. "Tom Ogilvy" wrote in message ... ActiveSheet.QueryTables(1).Delete after you refresh the data. -- Regards, Tom Ogilvy <M.Streeks wrote in message ... I have an excel template which pulls some data from my SQL server when opened. I need to set it so that it only pulls up the data when first opened from a template, but not after being saved as an xls file. Any ideas? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
External Data Warning Message - I have No External Data in wrkbk | Excel Discussion (Misc queries) | |||
Getting External Data based on criteria insde of the external data | Excel Discussion (Misc queries) | |||
Excel 2003 - Protecting Cells but allowing external data updates | Excel Worksheet Functions | |||
Data Validation Updates | Excel Worksheet Functions | |||
Data Updates With Date | Excel Discussion (Misc queries) |