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

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
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.
 
Upvote 0
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
 
Upvote 0

Forum statistics

Threads
1,214,875
Messages
6,122,037
Members
449,062
Latest member
mike575

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
Back
Top