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
 

Excel Facts

Which lookup functions find a value equal or greater than the lookup value?
MATCH uses -1 to find larger value (lookup table must be sorted ZA). XLOOKUP uses 1 to find values greater and does not need to be sorted.

Forum statistics

Threads
1,214,925
Messages
6,122,301
Members
449,078
Latest member
nonnakkong

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