It could be balking at the variable "string" since that is a reserved word.
Try changing it to "strg" or "myPath" or anything not reserved for VBA
constants or data types nad see if it still hiccups on the first loop.
"John Keith" wrote:
On Sun, 12 Oct 2008 10:29:03 -0500, Dave Peterson
wrote:
Dave,
Your code worked ok for me.
My code works fine the second time it is run after I get the erro
rmessage :-(
It was based on the GetValue function from John Walkenbach's site:
http://j-walk.com/ss/excel/eee/eee009.txt
You're very astute! The url looks different from what I remember but
yes, I did pick up the tip from John W.
I'm not sure if your code is a skinnied down example of what you're doing,
The code is the same as what I am running with the exception of
changing the path, file and string variables for a little privacy as I
noted in the reply to the other post in this string.
if you're just plopping the value into a cell
Yes, that is all I am doing.
it may be easier to find the
problem if you just put a formula to return the value directly into your cell:
I'll play with your suggestion. If it works why wouldn't I just
continue to use this process?
Thanks!
John Keith