|
-
Jan 10th, 2005, 04:32 PM
#1
Thread Starter
Addicted Member
Open File for Input erring out[RESOLVED]
Im trying to code a macro using VBA for excel...and im having a problem trying to open a txt file for input.
I'll let the following code do the talking:
Const ICDUsersFile = 1
Open "C:\Program Files\MicroStrategy\Administrator\Command Manager\ICD_Users.txt" For Input As ICDUsersFile
Dim counter As Integer
counter = 1
Dim strTemp As String
While Not EOF(ICDUsersFile)
Line Input #ICDUsersFile, strTemp
UserArray(i) = strTemp
counter = counter + 1
Close #1
Wend
Close ICDUsersFile
I have made sure that the file specified in the path exists at the location. The syntax seems to be right...I have spent so much time on this, and i am still not being able to debug this issue...any correspondence will be highly appreciated!! The code errs out right after the open file statement...
Thanks in advance!!
Last edited by perlmonk; Jan 11th, 2005 at 12:21 PM.
Reason: resolved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|