Ver Mensaje Individual
  #3 (permalink)  
Antiguo 24/08/2006, 13:49
Avatar de elsaky
elsaky
 
Fecha de Ingreso: junio-2006
Ubicación: Buenos Aires, Argentina
Mensajes: 53
Antigüedad: 17 años, 11 meses
Puntos: 0
esto te deja copiar filas en uso
saludos

pegalo en un modulo

Option Explicit
Private Type SHFILEOPSTRUCT
hWnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Integer
fAnyOperationsAborted As Boolean
hNameMappings As Long
lpszProgressTitle As String
End Type

Declare Function SHFileOperation Lib "shell32.dll" Alias "SHFileOperationA" _
(lpFileOp As SHFILEOPSTRUCT) As Long

Private Const FO_COPY = &H2
Private Const FOF_ALLOWUNDO = &H40

Public Sub SHCopyFile(ByVal from_file As String, ByVal to_file As String)
Dim sh_op As SHFILEOPSTRUCT

With sh_op
.hWnd = 0
.wFunc = FO_COPY
.pFrom = from_file & vbNullChar & vbNullChar
.pTo = to_file & vbNullChar & vbNullChar
.fFlags = FOF_ALLOWUNDO
End With

SHFileOperation sh_op
End Sub