move text file into workbook

jdoiron

New Member
Joined
Aug 19, 2002
Messages
16
Does anyone know how to move a text file opened in excel into another workbook as a new sheet? I can move it and copy it, but just not into a different workbook than it already exists in. Thank-you
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Right click the sheet tab and choose Move or Copy. In the To Book dropdown choose the name of the workbook to which you want to move the sheet (it must be open) and click OK. Your text file will disappear as a Window and appear as a new sheet in the target workbook.
 

Krupa

New Member
Joined
Oct 7, 2002
Messages
8
Hi,

I am not sure I understand why you cannot move it and copy it to another workbook.
Is there a sheet of this name already in the destination workbook? Do you want to paste to a new sheet, or rewrite over the existing data.
If you want to rewrite over the current sheet you could do something like this:

'this is the sheet you want to copy
Workbooks("Book1").Sheets("Sheet1").Select
Cells.Select
Selection.Copy

'this is the workbook you want to copy too
Workbooks("Book2").Activate

'this is the sheet you want to copy to
Workbooks("Book2").Sheets("Sheet1").Select
Range("A1").PasteSpecial xlPasteAll

Hope this helps. If it doesn't try to explain the situation a little more, and we can go from there.

Krupa
 

Forum statistics

Threads
1,144,768
Messages
5,726,179
Members
422,660
Latest member
mrsteele

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top