ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Tom Ogilvy:Object Error Still (https://www.excelbanter.com/excel-programming/285002-tom-ogilvy-object-error-still.html)

Rhonda[_3_]

Tom Ogilvy:Object Error Still
 
Hi Tom,

Everytime I run this code it never picks up on the query,
it always comes back and says it can't be found. I
attempted to Debug using the Step Into and when it gets
to Set rng = sh.Range(RngName), I get sh.Range(RngName)
=<Application-Defined or Object-Defined-Error, Rng =
Nothing and also Method "Range" of Object "_Worksheet"
failed.

It does get the iqy file and then strips of the last 4
characters to give the range name but for some reason
this is all that happens, it just goes on to display that
it wasn't found. (Just a note, all of my queries are in
Sheet2). Could you take a look, I would really like to
get this working.

Thanks for all your help and time!!!


All times are GMT +1. The time now is 09:07 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com