Solved

Remove File Attributes For Accessing

Posted on 1999-01-05
2
189 Views
Last Modified: 2010-05-03
I am trying to write to a file that has "Read Only" and "Hidden" attributes. How does one remove these attributes from within a program using Visual Basic 5.0 ?
This is my first question and I am a novice so please be gentle.
0
Comment
Question by:heck
2 Comments
 
LVL 4

Expert Comment

by:mcix
ID: 1454044
Try..

To set
SetAttr "C:\SomeFile",vbNormal

To Restore
SetAttr "C:\SomeFile", vbHidden + vbReadOnly      
0
 
LVL 2

Accepted Solution

by:
cantrell earned 30 total points
ID: 1454045
This is correct.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

791 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