VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



How to set file attributes to read only hidden or archive few lines code

by Shahid Rasool (8 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Wed 19th January 2005
Date Added: Mon 8th February 2021
Rating: (1 Votes)

How to set file attributes to read only hidden or archive few lines code

API Declarations


'Autho: Shahid Rasool
'Email: [email protected]
'you need 3 check box

Rate How to set file attributes to read only hidden or archive few lines code



Private Sub Check1_Click()
Dim a
a = "E:\Tesr\Ave Maria.mp3" 'this is file Put your file here
 
 
If Check1.Value = 1 Then
   VBA.SetAttr (a), vbReadOnly
ElseIf Check1.Value = 0 Then
   VBA.SetAttr (a), vbNormal
   End If
End Sub

Private Sub Check2_Click()
Dim a
a = "E:\Tesr\Ave Maria.mp3" 'this is file this is file Put your file here
 
 
If Check2.Value = 1 Then
   VBA.SetAttr (a), vbHidden
ElseIf Check2.Value = 0 Then
   VBA.SetAttr (a), vbNormal
   End If
End Sub

Private Sub Check3_Click()
Dim a
a = "E:\Tesr\Ave Maria.mp3" 'this is file this is file Put your file here
 
 
If Check3.Value = 1 Then
   VBA.SetAttr (a), vbArchive
ElseIf Check3.Value = 0 Then
   VBA.SetAttr (a), vbNormal
   End If
End Sub



Download this snippet    Add to My Saved Code

How to set file attributes to read only hidden or archive few lines code Comments

No comments have been posted about How to set file attributes to read only hidden or archive few lines code. Why not be the first to post a comment about How to set file attributes to read only hidden or archive few lines code.

Post your comment

Subject:
Message:
0/1000 characters