Solved

Remove File Attributes For Accessing

Posted on 1999-01-05
2
187 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
Comment Utility
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
Comment Utility
This is correct.
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

728 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now