copy and check sheets in one action

cocopops2001

Board Regular
Joined
Apr 18, 2011
Messages
112
what i want to do is copy a sheet into a user workbook from a masterworkbook but to check if a cover sheet exists first.

here is a breakdown of the process.

user opens 'master workbook' and decides which sheet they want to copy (clicks copy button)

opens user workbook or creates new workbook(if this can be done in the same directory as the 'master' or even allow the user to decide which folder)

checks if the 'user workbook' has specific cover sheet(check if sheet1, cell A1 has "title" in it) if the cover sheet exist paste in desired sheet, if not create cover sheet then paste desired sheet. it is important that the cover sheet is put in sheet1 of the 'user workbook'

what i would like is a way for the macro to remember which sheet from the 'master' is to be copied. i am currently using

Code:
ActiveSheet.Range("a11:n70").Copy

the problem is that when the macro does the covercheck and has to copy/paste 'cover sheet' into new workbook the clipboard will clear and the desired sheet will not be copied.

thanks
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

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