help for this...
want to set an attribute of file.
4 status Hidden, archive, system, read only.

thank you all...

Best Regards


see this following code :
needed 4 check box, 1 textbox and 2 button.

Dim NamaFile As String
Private Sub Command1_Click()
Cmd.Filter = "All Files|*.*"
Cmd.DialogTitle = "Select Target"
NamaFile = Cmd.FileName
Text1.Text = NamaFile
End Sub

Private Sub Command2_Click()
Dim NilaiAttributes As Byte
If NamaFile <> "" Then
NilaiAttributes = (Check1.Value * 2) + (Check2.Value * 4) + _
                  (Check3.Value * 1) + (Check1.Value * 32)
SetAttr NamaFile, NilaiAttributes
MsgBox "Set attributes successfull", vbInformation, "Setting Attributes"
End If
End Sub

Private Sub Text1_Change()
NamaFile = Text1.Text
End Sub

Private Sub Text1_GotFocus()
NamaFile = Text1.Text
End Sub

Hope this helps...

commented: good +1
commented: Freaks +1
commented: thank you +1

thank you :)

I need to do the same thing, only with a folder. But I may be missing something fundamental. With VB6 I get errors on line 3 of the example code. "Object Required". That is the 'cmd.filter =' line.

What am I missing? What object is it looking for?