Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default HELP on this strange errror : Method OpenTextFile of IFilesystem3 Failed

I have a VBA macro on MS Excel that should open and read from a Text
file. This is the code

Dim fs, Tempfile
Set fs = CreateObject("Scripting.FileSystemObject")
Set TempFile = fs.OpenTextFile(strInputFile, 1, False)
Do While TempFile.AtEndOfLine < True
' Process
Loop

It works for all of our users but one. One guy is getting this strange
error meesage when the code executes. I checked his MS excel and found
its same as mine, Office 2003 SP1 (The code works fine in my machine).

Can you GURUS please help me on this.....

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 983
Default HELP on this strange errror : Method OpenTextFile of IFilesystem3

Can this user open the file. Find the file in windows explorer and try to
open it. They may not have access to open this file. If they can open it then
do they have the same drive mapping to get to the file. For example your G:
drive might be their H: drive. If this is the case you will have to use the
full path, not just the local mapping. For example \\MyServer\MyDirectory...

HTH

"Learner" wrote:

I have a VBA macro on MS Excel that should open and read from a Text
file. This is the code

Dim fs, Tempfile
Set fs = CreateObject("Scripting.FileSystemObject")
Set TempFile = fs.OpenTextFile(strInputFile, 1, False)
Do While TempFile.AtEndOfLine < True
' Process
Loop

It works for all of our users but one. One guy is getting this strange
error meesage when the code executes. I checked his MS excel and found
its same as mine, Office 2003 SP1 (The code works fine in my machine).

Can you GURUS please help me on this.....


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 72
Default HELP on this strange errror : Method OpenTextFile of IFilesystem3 Failed

This might help:

http://www.officekb.com/Uwe/Forum.as...rors/1288/IFil
eSystem3


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default HELP on this strange errror : Method OpenTextFile of IFilesystem3

Thanks Jim!
I dont think this is the issue because the user has access to the txt
file the code is trying to open. Also, as you suggested its already in
\\Shareserver\Sharefolder\Sharefile.txt format

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Method Add of object Validation Failed - please help Shokie Excel Worksheet Functions 1 July 10th 09 01:33 PM
Method failed when creating new worksheets kdev[_3_] Excel Programming 5 November 22nd 04 05:00 PM
Copypicture method failed Kamal[_5_] Excel Programming 2 April 22nd 04 11:31 AM
Calculation Method Failed Martiin Excel Programming 2 December 1st 03 01:37 PM
Method ~ of Object ~ Failed. Joan Excel Programming 5 August 26th 03 08:13 PM


All times are GMT +1. The time now is 02:38 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"