Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default merging two files

Does anyone know how to alter this so I can import two files onto th
same sheet and same columns. I have been altering this code all da
and it only shifts the code to the right it's driving me crazy. I
anyone has any ideas please let me know.
Here is what I have.
-----------------------------------------------------------------------------------
Sub Macro4()

With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Documents and Settings\rg5\Desktop\Monthl
Reports\Work in Progres
Report\MonthlyReportCSVs\ECN\URLTemplateAction." _
, Destination:=Range("A1"))
.Name = "URLTemplateAction._5"
.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 = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1)
.Refresh BackgroundQuery:=False
End With
Rows("1:6").Select
Selection.Delete Shift:=xlUp
Columns("B:B").Select
Selection.Insert Shift:=xlToRight
Application.Rows.End(xlUp).Select
With ActiveSheet.QueryTables.Add(Connection:= _
"TEXT;C:\Documents and Settings\rg5\Desktop\Monthl
Reports\Work in Progres
Report\MonthlyReportCSVs\CA\URLTemplateAction." _
, Destination:=Selection)
.Name = "URLTemplateAction._6"
.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 = False
.TextFileTabDelimiter = False
.TextFileSemicolonDelimiter = False
.TextFileCommaDelimiter = True
.TextFileSpaceDelimiter = False
.TextFileColumnDataTypes = Array(1, 1)
.Refresh BackgroundQuery:=False
End With
End Sub
------------------------------------------------------------------------------------
Thank you

Morry :confused

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging 2 files Distribution list - Contacts Module Excel Discussion (Misc queries) 1 October 25th 08 02:48 AM
merging zip files! via135 Excel Discussion (Misc queries) 2 November 19th 06 05:32 PM
merging two files mcap Excel Discussion (Misc queries) 3 April 9th 06 07:28 PM
Merging two different files justinfisher Excel Discussion (Misc queries) 0 January 21st 05 08:53 PM
Merging Files rglasunow[_13_] Excel Programming 3 February 3rd 04 01:27 AM


All times are GMT +1. The time now is 06:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"