Ver Mensaje Individual
  #4 (permalink)  
Antiguo 22/03/2005, 18:01
Avatar de vbx3m
vbx3m
 
Fecha de Ingreso: febrero-2005
Ubicación: Venezuela
Mensajes: 524
Antigüedad: 20 años, 3 meses
Puntos: 1
Pon esto:

Option Explicit
Dim FName As String
Dim File As String
Const FILE_ATTRIBUTE_READONLY = &H1

Private Declare Function SetFileAttributes Lib "kernel32" Alias "SetFileAttributesA" (ByVal lpFileSpec As String, ByVal dwFileAttributes As Long) As Long

Private Sub Command1_Click()
Dim attr As Long
If Checkbox1.Value = Checked Then 'Si es True marca solo lectura si lo desmarcas le quitas esa propiedad

attr = FILE_ATTRIBUTE_READONLY
End If
SetFileAttributes File, attr
End Sub

Private Sub File1_Click()
File = Dir1.Path
If Right(File, 1) <> "\" Then
File = File & "\"
End If
File = File & File1.List(File1.ListIndex)
FName = File1.FileName
End Sub

Espero te sirva...
__________________
ホルヘ・ラファエル・マルティネス・レオン