Author : Shahid Rasool
Date Submitted : 1/19/2005
Category : Other
Compatibility : VB 6
This code has been accessed 4178 times.
Task : How to set file attributes to read only hidden or archive few lines code
Declarations
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