Professional Documents
Culture Documents
Macro Importar Datos Excel Modificada
Macro Importar Datos Excel Modificada
' FileName = InputBox("Please enter the Text File's name, e.g. test.txt") 'Ask User for File's Name
' If FileName = "" Then End 'Check for no entry
FileName = Application.GetOpenFilename(filefilter:="Archivo de texto (*.txt),*.txt", Title:="Elegir Archivo")
If FileName = "" Then End 'Check for no entry
If ActiveCell.Row = 1000000 Then 'For Excel versions before Excel 97, change 65536 to 16384
ActiveWorkbook.Sheets.Add 'If On The Last Row Then Add A New Sheet
Else
ActiveCell.Offset(1, 0).Select 'If Not The Last Row Then Go One Cell Down
End If
Counter = Counter + 1 'Increment the Counter By 1
Loop 'Start Again At Top Of 'Do While' Statement
End Sub