Codigos
Codigos
If Target.Row = 6 Then
Sheets("hoja1").Cells(Target.Row, 2).Value = 1
Else
End If
End If
End Sub
Sub transferir()
Dim NombreArchivo As String
palabraBusqueda = Sheets("Hoja4").Cells(2, 6)
palabraBusqueda = Sheets("Hoja4").Cells(2, 6)
End Sub
Sub duplicados()
Sheets("Hoja2").Range("A2").Select
activecell.EntireRow.Delete
Else
activecell.Offset(1, 0).Select
End If
Loop
End Sub
Option Explicit
If target.row = 2 Then
Sheets("hoja2").Cells(target.row, 2).Value = 1
Else
End If
End If
End Sub
Sub indexar()
Dim i As Integer
On Error GoTo 0
Next celda
For i = 1 To unicos.Count
Next i
End Sub
Next
End If
With target
.Value = .Value
End With
Else
xCell.Formula = xDic.Item(xCell.Address)
Next
End If
End Sub
'This function loops through all the files in the folder and
'gets the properties of each file and displays them on the sheet
Public Sub GetFileProperties()
'Variable Declaration
strPath = Sheet1.Range("C3").Value
End If
iCurRow = 7
Do While vFile <> "" 'LOOP until all files in folder strPath have been looped through
'File name
'Date Created
'Type
Sheet1.Cells(iCurRow, 8).Value = objFile.Type
vFile = Dir
iCurRow = iCurRow + 1
Loop
End Sub
Option Explicit
Sub GetFileNames()
With Application.FileDialog(msoFileDialogFolderPicker)
.InitialFileName = Ruta_inicial
.Show
fila = fila + 1
Loop
End If
End With
End Sub
Sub nuevo2()
Dim wb As Workbook
Dim ws_entradas As Worksheet
Set wb = ActiveWorkbook
i = suma + 1
n=0
m=0
For cu = i To 60000
n=n+1
End If
Next cu
For re = 1 To 60000
m=m+1
End If
Next re
If n > 0 Then
rang_copia.Copy _
Destination:=ws_resumen.Cells(m, 9)
End If
End Sub
Sub nuevo()
Dim wb As Workbook
Set wb = ActiveWorkbook
i = suma + 1
n=0
m=0
For cu = i To 60000
n=n+1
End If
Next cu
For re = 1 To 60000
m=m+1
End If
Next re
If n > 0 Then
rang_copia.Copy _
Destination:=ws_resumen.Cells(m, 1)
End If
End Sub
Sub documemts()
ws1.Visible = True
ws1.Activate
counter0 = 0
For i = 2 To 30
counter0 = counter0 + 1
End If
Next i
ws2.Visible = True
ws2.Activate
counter1 = 0
For j = 1 To 150
ws2.Cells(j, 1).Select
counter1 = counter1 + 1
End If
Next j
For k = 2 To counter0 + 1
For l = 2 To counter1 + 1
End If
End If
End If
End If
Next l
Next k
Z=2
ws2.Cells(Z, 14).Select
Selection.EntireRow.Delete
Z=1
End If
Z=Z+1
Wend
End Sub
Public X()
Public i As Long
Sub MainExtractData()
Application.ScreenUpdating = False
MainFolderName = BrowseForFolder()
X(1, 1) = "Ruta"
X(1, 5) = "Autor"
i=1
'error handling to stop the obscure error that occurs at time when retrieving DateLastAccessed
i=i+1
If i Mod 20 = 0 And TimeLimit <> 0 And Timer > (TimeLimit * 60 + StartTime) Then
GoTo FastExit
End If
If i Mod 50 = 0 Then
DoEvents
End If
X(i, 1) = oFolder.Path
X(i, 2) = Fil.Name
X(i, 3) = Fil.DateLastAccessed
X(i, 4) = Fil.DateLastModified
X(i, 5) = Fil.DateCreated
X(i, 6) = Fil.Type
X(i, 7) = Fil.Size
X(i, 8) = objFolder.GetDetailsOf(objFolderItem, 8)
X(i, 9) = objFolder.GetDetailsOf(objFolderItem, 9)
Next
'Get subdirectories
If TimeLimit = 0 Then
Call RecursiveFolder(oFolder, 0)
Else
End If
FastExit:
Range("A:K") = X
Range("A:K").WrapText = False
Range("A:K").EntireColumn.AutoFit
Range("1:1").Font.Bold = True
Rows("2:2").Select
ActiveWindow.FreezePanes = True
Application.StatusBar = ""
Application.ScreenUpdating = True
End Sub
Dim SubFld
i=i+1
Exit Sub
End If
If i Mod 50 = 0 Then
DoEvents
Sheets(“hoja1”).select
End If
X(i, 1) = SubFld.Path
X(i, 2) = Fil.Name
X(i, 3) = Fil.DateLastAccessed
X(i, 4) = Fil.DateLastModified
X(i, 5) = Fil.DateCreated
X(i, 6) = Fil.Type
X(i, 7) = Fil.Size
X(i, 8) = objFolder.GetDetailsOf(objFolderItem, 8)
X(i, 9) = objFolder.GetDetailsOf(objFolderItem, 9)
Else
End If
Next
Next
End Sub
'If the "OpenAt" path is provided, open the browser at that directory
'NOTE: If invalid, it will open at the Desktop level
BrowseForFolder = ShellApp.self.Path
On Error GoTo 0
'handler if found
Case Is = ":"
Case Is = "\"
Case Else
GoTo Invalid
End Select
Exit Function
Invalid:
'If it was determined that the selection was invalid, set to False
BrowseForFolder = False
End Function
Option Explicit
If Target.Row = 2 Then
Application.ScreenUpdating = False
MainFolderName = BrowseForFolder()
X(1, 1) = "Ruta"
X(1, 2) = "Indexación"
X(1, 4) = "Producto"
X(1, 8) = "Descripción"
X(1, 9) = "Creación"
X(1, 6) = "Autor"
i=1
'error handling to stop the obscure error that occurs at time when retrieving DateLastAccessed
i=i+1
If i Mod 20 = 0 And TimeLimit <> 0 And Timer > (TimeLimit * 60 + StartTime) Then
GoTo FastExit
End If
If i Mod 50 = 0 Then
DoEvents
End If
X(2, 1) = oFolder.path
X(2, 3) = Fil.Name
X(2, 7) = Fil.dateLastModified
X(2, 9) = Fil.DateCreated
Next
'Get subdirectories
If TimeLimit = 0 Then
Call RecursiveFolder(oFolder, 0)
Else
End If
FastExit:
Range("A:K") = X
Range("A:K").WrapText = False
Range("A:K").EntireColumn.AutoFit
Range("1:1").Font.Bold = True
Rows("2:2").Select
End If
Application.StatusBar = ""
Application.ScreenUpdating = False
End If
End Sub
Dim SubFld
i=i+1
Exit Sub
End If
If i Mod 50 = 0 Then
DoEvents
End If
X(1, 1) = oFolder.path
X(1, 2) = objFolder.GetDetailsOf(objFolderItem, 2)
X(1, 3) = Fil.Name
X(1, 4) = objFolder.GetDetailsOf(objFolderItem, 4)
X(1, 5) = objFolder.GetDetailsOf(objFolderItem, 5)
X(1, 7) = Fil.dateLastModified
X(1, 8) = objFolder.GetDetailsOf(objFolderItem, 8)
X(1, 9) = Fil.DateCreated
i=1
Else
End If
Next
Call RecursiveFolder(SubFld, TimeTest)
Next
End Sub
'If the "OpenAt" path is provided, open the browser at that directory
BrowseForFolder = ShellApp.self.path
On Error GoTo 0
'handler if found
Case Is = ":"
Case Is = "\"
GoTo Invalid
End Select
Exit Function
Invalid:
'If it was determined that the selection was invalid, set to False
BrowseForFolder = False
End Function
Public X()
Public i As Long
Sub MainExtractData()
Dim NewSht As Worksheet
MainFolderName = BrowseForFolder()
Sheets("hoja1").Select
X(1, 1) = "Ruta"
X(1, 3) = "numero"
X(1, 9) = "Creación"
X(1, 6) = "Autor"
i=1
'error handling to stop the obscure error that occurs at time when retrieving DateLastAccessed
i=i+1
If i Mod 50 = 0 Then
DoEvents
End If
X(i, 1) = oFolder.path
X(i, 2) = Fil.Name
X(i, 7) = Fil.dateLastModified
X(i, 9) = Fil.DateCreated
Next
'Get subdirectories
FastExit:
Range("A:K") = X
Range("A:K").WrapText = True
Range("A:K").EntireColumn.AutoFit
Range("1:1").Font.Bold = True
Rows("2:2").Select
Application.StatusBar = ""
Sheets("hoja1").Select
End Sub
Dim SubFld
For Each SubFld In xFolder.SubFolders
Sheets("hoja1").Select
i=i+1
Exit Sub
End If
If i Mod 50 = 0 Then
DoEvents
End If
X(i, 1) = SubFld.path
X(i, 2) = Fil.Name
X(i, 7) = Fil.dateLastModified
X(i, 9) = Fil.DateCreated
Else
End If
Next
Next
End Sub
BrowseForFolder = ShellApp.self.path
On Error GoTo 0
'handler if found
Case Is = ":"
Case Is = "\"
Case Else
GoTo Invalid
End Select
Exit Function
Invalid:
'If it was determined that the selection was invalid, set to False
BrowseForFolder = False
End Function
Sub ListarPropiedadesFicherosCarpeta()
Range("I1").value = "Atributo"
Range("A1:J1").Font.Bold = True
Range("A2").Select
activecell = archivo.Name
activecell.Offset(0, 1) = archivo.DateCreated
activecell.Offset(0, 2) = archivo.DateLastAccessed
activecell.Offset(0, 3) = archivo.DateLastModified
activecell.Offset(0, 4) = archivo.Type
activecell.Offset(0, 5) = archivo.Size
activecell.Offset(0, 6) = archivo.ShortPath
activecell.Offset(0, 7) = archivo.ShortName
activecell.Offset(0, 8) = archivo.Attributes
activecell.Offset(0, 9) = archivo.Path
activecell.Offset(1, 0).Select
Next archivo
Range("A:J").EntireColumn.AutoFit
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''
Application.ScreenUpdating = True
End Sub
Sub abrirArchivo()
strArchivo = Application.GetOpenFilename
If strArchivo = False Then Exit Sub
Workbooks.OpenText Filename:=strArchivo
End Sub