Copy two columns from one Excel sheet to another
<p>I need to copy two columns of one Excel sheet to the same columns of another Excel sheet using VBScript. These columns are adjacent to each other
I am using the following code, which I got from by some search and changed to my need. It is working fine if it is to copy one column but it is not copying two columns from one excel to another.</p>

<pre><code>Set objExcel = CreateObject("Excel.Application")
objExcel.Visible = True
Set objWorkbook = objExcel.Workbooks.Open("C:\Desktop\Customer.xlsx")
Set objWorkbook2 = objExcel.Workbooks.Open("C:\Documents\Folder1\Test.xlsx")

Set objWorksheet = objWorkbook.Worksheets(1)
objWorksheet.Activate

Set objRange = objWorkSheet.Range("A1").EntireColumn
Set objRange = objWorkSheet.Range("B1").EntireColumn
objRange.Copy

Set objWorksheet2 = objWorkbook2.Worksheets(1)
objWorksheet.Activate

Set objRange = objWorkSheet2.Range("A1")
Set objRange = objWorkSheet2.Range("B1")
objWorksheet.Paste(objRange)
</code></pre>

<p>My Input Excel file is:</p>

<pre>Customer Number    Customer Name
1001    Wendy
1002    Subway
1003    McDonalds</pre>

<p>My output Excel file has the same column names but is presently have no values in these columns. After copying from the input Excel, I should have the same values to the these columns in the second Excel file.</p>