+ Reply to Thread
Results 1 to 4 of 4

Deleting Query Tables with a Macro

  1. #1
    Forum Contributor
    Join Date
    02-16-2008
    Location
    Mansfield, TX
    Posts
    324

    Deleting Query Tables with a Macro

    So I have a spreadsheet that I import text files to every week for three months. At the end of the three months I have to go in and delete all of the data and the query that I have set up so that I can start over for three more months. I can import them via a macro just fine, but I cannot for the life of me figure out how to get the macro I recorded to delete them to work. I have tried three different macros with no success. The code is below. I would love some help.

    The first macro I use creates a yes/no dialog box and calls the macro to delete the actual data and queries.

    Please Login or Register  to view this content.
    These are the two macros I have been unsuccessfully trying to get to work.

    Please Login or Register  to view this content.
    Please Login or Register  to view this content.
    Here is a link to the workbook, if that will help.

    http://www.4shared.com/file/59168046...V3AWESOME.html

    Thanks for any help you can give me, because I am at a complete loss right now.

    Clayton Grove

  2. #2
    Forum Contributor
    Join Date
    10-01-2007
    Posts
    101
    this should clear the contents. still working on the querytable part.

    Please Login or Register  to view this content.

  3. #3
    Forum Contributor
    Join Date
    07-01-2008
    Location
    Cincinnati, OH
    Posts
    150
    Hi Clayton.

    If you are creating your querytables by way of code, there may be no need to save the querytable to begin with. If this is the case, just add delete after your refresh line.

    Please Login or Register  to view this content.
    If I am wrong above...

    Work directly with the querytables instead of the ranges they reside in.

    Please Login or Register  to view this content.
    BTW. Your file gave me a chuckle. I liked the nuclear warning.
    Last edited by Tom Schreiner; 08-16-2008 at 03:12 AM.

  4. #4
    Forum Contributor
    Join Date
    02-16-2008
    Location
    Mansfield, TX
    Posts
    324
    In an internet full of geniuses, you guys are the real mccoy!

    Thanks for the help, and I am glad you got a chuckle out of the pictures!

    Clayton Grove

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1