Link to home
Start Free TrialLog in
Avatar of andysalih
andysalih

asked on

any ideas on this

I've just upgraded from 98 to 2k professional,

this piece of code below worked fine in part of a module but since i upgrades it keeps giving me an error

this is the code :-

   
    With Application.filesearch
     .filename = "*.csv"
     .LookIn = "C:\files"
     .SearchSubFolders = False
     .Execute
     fc = .FoundFiles.Count


this is the error :-

run-time error 5

Invalid procedure call or aguement & that happens on .filename="*.csv"

any idea's on that one.

lost me.

cheers

Andy
Avatar of Guy Hengel [angelIII / a3]
Guy Hengel [angelIII / a3]
Flag of Luxembourg image

I guess that the code is a Macro inside of an Office module (word, excel etc).
Now, did you upgrade Office or Windows to 2k? I guess that you mean Windows, but anyway, on my W2k workstation that piece of code works fine...

Listening & Learning
Works fine for me, Win2KSP2 and Office 2K SP2
Avatar of andysalih
andysalih

ASKER

okey guys, thanks for that, but

I'm currently using access 97, Reason being is that all our clients are on access 97 and will not upgrade, So ive upgraded 98 to 2000 professional. The module written is an actual function inside of access called my a sub function, anyway i wont get into that,

Im just wondering if its something to do with win professional.

hmmmm

dunno

I'll leave this open for a while in case anybody else has any idea's

im still stuck

whats happening is that i get this error :-

run-time error 5

Invalid procedure call or aguement & that happens on .filename="*.csv"



when it finds a file with that extension. WHY ??????

ive tried it on all the other computer which are running win 98 and NT4 but it will not work with 2000 professional.

what can it be

i've even tried it with a .txt extension and if it finds a file it still does the same.
ASKER CERTIFIED SOLUTION
Avatar of Moondancer
Moondancer

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
50 points have been refunded to you.  Did anyone here help you whom you intended to give points?
Thanks,
Moondancer - EE Moderator