jiiins2
asked on
Open hidden txt files with VBA Open statement
Hello,
in an Excel 2003 vba function I'm trying to open a normal txt file like this:
Open filename for input as #1
It works fine until I hide the file (using explorer's file properties). When the file is hidden, the function can't find it anymore... what am I missing? How can I retrieve it when is hidden?
Thanks,
J
in an Excel 2003 vba function I'm trying to open a normal txt file like this:
Open filename for input as #1
It works fine until I hide the file (using explorer's file properties). When the file is hidden, the function can't find it anymore... what am I missing? How can I retrieve it when is hidden?
Thanks,
J
ASKER
Here is the code:
flFees = ThisWorkbook.Path & "\fees.txt"
Open flFees For Output As #1 <- here I get run-time error 75
If I unhide fees.txt it works fine.
flFees = ThisWorkbook.Path & "\fees.txt"
Open flFees For Output As #1 <- here I get run-time error 75
If I unhide fees.txt it works fine.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the quick answer and sorry for my confused input/output question!
Are you sure you didn't accidently change the name or location of the file in Explorer or your code?
Is there anything else that you can tell us...maybe paste your problem code here for us to see...
:-)
ah