View Single Post
 
Old 07-25-2018, 04:34 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Good point Paul

I wouldn't normally create the xlApp in the same line as the declaration of the variable. Could that be the issue?

This thread http://www.vbforums.com/showthread.p...ice-pack-error seems to encounter a similar error and potentially relates to an upgraded version of Excel causing confusion with the one line declaration and creation of the application object.

I've also encountered a problem recently whereby the Dir command fails if the file is present BUT has the Hidden attribute set. For that one I had to use FileSystemObject instead to test for the file. I'm not saying that is the problem in this case.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia