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: 10
Default HELP: SQL in Excel VBA

Hi All,

I recently changed some code of mine to perform an SQL query against a
database and dump the results into a worksheet.

I had a macro that went through each column and counted how many rows were
in each column, and any column that had no data was deleted (Count of 1)

I previously used the pre-2007 code to dump data which worked great but now
with the 2007 version of the code, it appears the data is treated as a pivot
table and because of this, each colymn has the same amount of used rows,
even though the cells are blank. Based on this, my macro to delete unused
columns doesn't detect any columns to delete.

I had to change the code for doing the sql because the old code didn't like
some of the SQL i used, even though it was valid SQL and worked in its
native environment. The new code sees the SQL work, but now I have this
issue of data being treated as if its in a table rather than a series of
individual data elements.

Is anybody aware of a different way to do a data dump that doesn't produce a
pivottable or know of a way to reset the page so the data remains but any
table is removed - it appears that it isn't a pivot table in the proper
sense even though if you delete data it refers to it as a pivottable.

I extend a thank you in advance for any assistance.

Regards,
Clint

 
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



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

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

About Us

"It's about Microsoft Excel"