Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default disconnect a query table in VB

I have set up a query in excel pulling data from an access database. This is
set up in a template.

Having got the data I wish to disconnect the query table save the file and
publish. This is to ensure the receiver only gets the data and not the
connection and automatic update alert message.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 703
Default disconnect a query table in VB

Dim DB As Database
Dim RS As Recordset
'
Set DB = DBEngine.OpenDatabase(DBName, False, False, ";pwd=PASSWORD")
Set RS = DB.OpenRecordset(Sql, dbOpenSnapshot)
'
' ... get data, etc.
'
RS.Close
Set RS = Nothing
'
DB.Close
Set DB = Nothing


"ken F 2061" wrote:

I have set up a query in excel pulling data from an access database. This is
set up in a template.

Having got the data I wish to disconnect the query table save the file and
publish. This is to ensure the receiver only gets the data and not the
connection and automatic update alert message.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default disconnect a query table in VB

Click on a cell in the query range. Then go to the following menu

Data - Import External Data - Data Range Property

Then unclick the box that says "Save query Definition". Answer Yes to
permanetly delete query

"ken F 2061" wrote:

I have set up a query in excel pulling data from an access database. This is
set up in a template.

Having got the data I wish to disconnect the query table save the file and
publish. This is to ensure the receiver only gets the data and not the
connection and automatic update alert message.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pivot Tables disconnect Edi151 Excel Discussion (Misc queries) 1 March 5th 09 04:40 PM
How to disconnect the line for Internet? Eric Excel Discussion (Misc queries) 0 March 7th 08 04:29 AM
Shared Workbook - how to disconnect the pop-up... bondcrash[_28_] Excel Programming 1 June 22nd 06 03:15 PM
How to disconnect when WebQuery done Nathan Gutman Excel Programming 4 December 24th 03 03:31 PM
Disconnect a spreadsheet from its datasource Jenni[_2_] Excel Programming 2 October 30th 03 01:31 PM


All times are GMT +1. The time now is 12:01 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"