LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
Default ListObjects - VBA code that worked in previous versions of Excel does not work in Excel 2013

I had a similar problem with code that worked perfectly for Excel 10
under XP but gave Run-time 1004 error when I ran the same code under
Windows 7.

My code read in data from external databases (actually DBASEIV) into
excel database tables. After examining the code closely I noticed
that I cleared all the cells in my destination worksheet and then
deleted the old copy of the database table on that sheet. The error
disappeared when I deleted the table first and then cleared the
cells. I suspect that I was calling a delete method on a table
object that no longer existed resulting in the 1004 error. For some
reason, Excel under XP tolerated this sloppy coding.

So, my advice is to check your code carefully. Error 1004 is a
generic catch all type of error that gives no information. Just be
aware that some aspect of sloppy coding might have been tolerated in
your previous Excel environment but the new environment has decided
to be less tolerant !.


I found similar behavior with stuff that worked fine on XP/Vista/Win7
but bombed on Win8.1! I also found this behavior running on Win7HP and
Win7Pro, where HP allowed things Pro didn't.

It might be worth noting that as of v2010 all MS apps use VBA7 so it
handles 64-bit properly. I suspect the language got a thorough overhaul
for this purpose, but it (the language) essentially 'just works' in
both x32/x64 versions of apps. Note that x64 VBA projects must be
compiled in x64 versions, meaning you now need to maintain both for
now!<g

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


 
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
Sumifs in previous Excel-Versions [email protected] Excel Worksheet Functions 3 January 29th 09 06:15 PM
Excel 2007 vs previous versions Nic Excel Discussion (Misc queries) 1 May 29th 08 08:39 PM
tools/options/chart/not plotted doesnot work Excel Peter N Charts and Charting in Excel 1 November 14th 06 11:59 AM
How compatible is Excel 2003 with previous versions Rod Excel Discussion (Misc queries) 1 February 3rd 06 02:21 PM
Saving worksheet so that merge cells work in previous versions jimmylightning Excel Worksheet Functions 1 December 25th 05 01:58 PM


All times are GMT +1. The time now is 08:24 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"