LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default ClearContents Not Clearing Query

Hi ya'll

I have a sheet with a Import External Data from Access
query on it.

I am trying to programatically clear it with the
following code:

Cells.Select
Selection.ClearContents
Selection.QueryTable.Delete
Range("A1").Select

When I do it manually it works and the query is removed
from the sheet, but in the VBA module it does not remove
the query.

Am I doing something wrong or can someone help me with
this problem?

Thanks in advance
regards
Sean
 
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
Clearing cells without clearing formulas marsjune68 Excel Discussion (Misc queries) 2 April 10th 09 07:39 PM
ClearContents method on a passed range bryan New Users to Excel 2 January 19th 05 08:49 AM
Clearcontents K Dales Excel Programming 0 February 27th 04 01:52 PM
Clearcontents Dick Kusleika[_3_] Excel Programming 0 February 17th 04 05:42 PM
Error of ClearContents Richard[_23_] Excel Programming 1 January 1st 04 12:23 PM


All times are GMT +1. The time now is 04:10 AM.

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"