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...
Reputation Points: 1182
Solved Threads: 392
Posting Sensei
Offline 3,138 posts
since Nov 2007