Hola, hice una macro que importar un txt, pero deseo poder seleccionar el archivo a exportar...

tengo la siguiente macro: en ella quiero 2 cosas, poder seleccionar el archivo txt antes de importar y 2 especificar en la celda donde comenzara la importacion para asi no me choque con las celdas ya llenas...

Sub MacroImportarArchivotxt()
'
' MacroImportarArchivotxt Macro
'
'
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;\\Bodapps5\monitoreo de seguridad\Monitoreo servidor CB\Phishing\IPS BOD1731_1732_1733_1734.txt" _
, Destination:=Range("$A$1"))
.Name = "IPS BOD1731_1732_1733_1734"
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.RefreshOnFileOpen = False
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.TextFilePromptOnRefresh = False
.TextFilePlatform = 850
.TextFileStartRow = 1
.TextFileParseType = xlDelimited
.TextFileTextQualifier = xlTextQualifierDoubleQuote
.TextFileConsecutiveDelimiter = True
.TextFileTabDelimiter = True
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = True
.TextFileColumnDataTypes = Array(1, 1, 1, 1, 1, 1)
.TextFileTrailingMinusNumbers = True
.Refresh BackgroundQuery:=False
End With
End Sub

Añade tu respuesta

Haz clic para o