I have a loop that looks like the code below. Inside the sub createRequest there is another Dir command. The first time around the loop below everything works fine until it hits 'reqFile = Dir' it bombs out and says 'Run-time error 5: Invalid procedure call or argument.' If I comment out my Dir loop that's in the sub createRequest then I don't get the error. None of the variables are the same and everything is declared as public. Any ideas? Thanks.
Code:Do While reqFile <> "" createRequest reqFile = Dir Loop




Reply With Quote