atribbution hiden file dengan vb

Diposting oleh siSemprull On 23.49
Private Sub Form_Load()
    Dim LokasiFile As String
    Dim atributfile As Integer
   
    On Error GoTo salah
   
    LokasiFile = InputBox("Masukin lokasi/path dari file kamu, contoh: C:\myfile.txt ", "Input")
   
    atributfile = InputBox("pilih atribut filenya:" & vbCrLf & _
                    "1 = Normal" & vbCrLf & _
                    "2 = Hidden" & vbCrLf & _
                    "3 = ReadOnly" & vbCrLf & _
                    "4 = Archive" & vbCrLf & _
                    "5 = System", "Input", 1)
                   
    'mengubah atribut file sesuai yg kamu pilih
    Select Case atributfile
    Case 1: SetAttr LokasiFile, vbNormal
    Case 2: SetAttr LokasiFile, vbHidden
    Case 3: SetAttr LokasiFile, vbReadOnly
    Case 4: SetAttr LokasiFile, vbArchive
    Case 5: SetAttr LokasiFile, vbSystem
    Case Else: GoTo salah
    End Select
   
Exit Sub
salah:
    MsgBox "maaf kamu mungkin salah dlm penginputan, jalankan ulang programnya!", vbCritical
End Sub

Related Posts by Categories



Widget by Hoctro | Jack Book

0 Responses to 'atribbution hiden file dengan vb'

Posting Komentar

komentar anda sangat berarti..