Prompt and copy worksheet to different workbook

bcolmstead

New Member
Joined
Sep 22, 2006
Messages
1
Hi All,

I'm trying to use VB to copy a worksheet from one workbook to another.

I want to:
1) Prompt the user for the location of the workbook with the worksheet to be copied (I think I have this part done using GetOpenFilename)
2) Prompt the user to select the correct worksheet within the workbook specified in step 1
3) Automatically copy the entire sheet (or the data within the sheet) to my workbook that contains the macros.

I can't count on the workbook or worksheet names staying the same for steps 1 and 2. In my workbook, I have a sheet that I want it copied to - the name stays the same.

Thanks in advance. I've searched extensively thinking that someone else must have wanted this same thing at some point. I found bits and pieces, but I have been unable to pull it all together.

Ben
 

Some videos you may like

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Watch MrExcel Video

Forum statistics

Threads
1,108,624
Messages
5,523,963
Members
409,547
Latest member
AW2020

This Week's Hot Topics

Top