Ver Mensaje Individual
  #2 (permalink)  
Antiguo 17/11/2004, 16:01
Avatar de judoka
judoka
 
Fecha de Ingreso: enero-2004
Ubicación: viña del mar
Mensajes: 180
Antigüedad: 20 años, 3 meses
Puntos: 3
hola mira la siguiente macro abre un archivo numeros.txt y copia los valores en la hoj ade caculo a pertirde la celda A10

Sub Macro1()
ChDir "C:\mis documentos"
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\mis documentos\numeros.txt", Destination:=Range("a10"))
.Name = "numeros"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = xlWindows
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = True
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = False
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, _
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1)
.Refresh BackgroundQuery:=False
End With
End Sub
estoy lejos de ser un maestro , pero espero haberte podido ayudar
__________________
hay tres tipos de matemáticos, los que saben contar y los que no.
Oscar