help for this...
want to set an attribute of file.
4 status Hidden, archive, system, read only.
thank you all...
Best Regards
Neji
help for this...
want to set an attribute of file.
4 status Hidden, archive, system, read only.
thank you all...
Best Regards
Neji
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"
Cmd.ShowOpen
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...
thank you :)
loved to learn this :)
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?
Thanks
-RR
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.