Just to add a little bit of trivia to this for reference purposes:
#1 - If <Test> has an .xls extension - means that somewhere along the line
it was likely saved with an "xlsx" extension (or any other of the '2007
extensions) and then "incorrectly" renamed to have an .xls extension (or
simply saved at the outset with the incorrect extension for the format
selected).
#2 - If you open a '2007 workbook that has been renamed/saved with an .xls
extension directly from within Excel - you will encounter at least one
intermediate message advising that the format of the file differs from the
extension and a response is required by the user - which likely explains
why "GetObject" failed in your scenario - nothing wrong with the GetObject
statement nor is there a glitch with O'2007 as per questions in original
post.
We have run across a couple of customer scenarios where .xls files have
been provided by a lead generation service via web download. These ".xls
files" were in fact '2007 files with more than 255 columns causing all
kinds of aggravation even just within Excel regardless of the extension
used. Rule of thumb - if Excel itself can't open a file without user
interaction of some kind or other - nothing else is going to work
seemlessly either.
Karl
______________________
ContactGenie - QuickPort/DataPort/Exporter/Toolkit/Duplicate Contact Mgr
"""
"JoeRob" <JoeRob> wrote in message
news:9981D10D-7AF5-45F2-A377-1416D7EB08EB@microsoft.com...
> Sue & JP
> Thank you both for your assistance. I just had a few minutes to bash at
> this problem. Sorry, Sue your code doesn't work for "Test.XLS" if Test
> is an
> Excel 2007 file. JP you hit the nail on the head. By changing the
> extension
> to "Test.XLSM" the code works.eee
> Thank you both for your efforts.
> PS: JP your wrote "But you should be able to just see the file extensions
> in
> Windows Explorer..?" Is this something you turn on an off? I don't see
> file
> extensions in my list when Windows Explorer.
> "JP" wrote:
>
> > Check out http://technet.microsoft.com/en-us/library/cc179191.aspx, it
> > gives you a lot of (all?) the file extensions for Office 2007.
>
>> But you should be able to just see the file extensions in Windows
> > Explorer..?
>
>> --JP
>
>> On Jan 20, 12:14 pm, JoeRob <Joe...> wrote:
> > > The example I found was "MYTest.xls". As I suspected there are other
> > > extensions for excel. But, what are they, were do you find them.
> > > They don't
> > > show up in the path. I'm inexperienced and find finding thing like
> > > extensions, class names, etc very confusing.
> > >
>
>> .
> >