[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

OpenTextFile & Error 424

Posted on 2004-11-03
3
Medium Priority
?
1,130 Views
Last Modified: 2012-08-13
Hi

On some clients when i execute this code

Set fso = CreateObject("Scripting.FileSystemObject")
SFolder = fso.GetSpecialFolder(1)
Set MyFile = fso.OpenTextFile(SFolder & "\drivers\etc\hosts", 8)

i get Error 424 there.

The path file exists and user permissions seem to be ok (anyway it should return an error 70)

Any idea ?

pofpof
0
Comment
Question by:pofpof98
3 Comments
 
LVL 26

Expert Comment

by:EDDYKT
ID: 12485821
What's OS?


You may want to download the script engine from

http://msdn.microsoft.com/library/default.asp?url=/downloads/list/webdev.asp
0
 
LVL 6

Accepted Solution

by:
dsulkar earned 2000 total points
ID: 12485945
I still think that you have a user permission problem, Check to make sure that the user has rights to read write and modify.
0
 
LVL 14

Expert Comment

by:Shiju Sasidharan
ID: 12492426
Hi

"hosts" is ur file name ?

anywat try this


' Include the reference
'                Microsoft Scripting Runtime
'
'----------------------------------------------
Dim fso As New FileSystemObject
Dim MyFile As TextStream
Dim SFolder  as Folder
SFolder = fso.GetSpecialFolder(1)
Set MyFile = fso.OpenTextFile(SFolder & "\drivers\etc\hosts.txt", 8)


'-----------------------------------------------

;-)
Shiju

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question