Creating a macro that will create a new sheet and copy data from [Closed]

Report
-
Posts
1260
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
February 3, 2020
-
Hello,

I want my macro to 1) create a new sheet and 2) copy data from another sheet onto the new sheet. For some reason it (my macro) will create the sheet but does not copy the data range (or any data at all) from the older sheet onto the newly created sheet.

I am doing a copy and then paste special (values).

Any thoughts?

Thanks!

Susan


2 replies

Posts
1260
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
February 3, 2020
212
Hello Susan,

Have a look at the following thread:-

https://ccm.net/forum/affich-859527-vba-copying-data-to-new-sheets

My post#2 gave the OP a solution but he did not have the courtesy to reply so we don't know if it worked for him.

I believe that your situation is similar. Following is the link to my test work book for the thread mentioned above. Have a look and see what you think:-

https://www.dropbox.com/s/2qopzyktfjjoj94/Rayz221%28Create%20Sheets%20%26%20Copy%20Data%29.xlsm?dl=0

Let us know what you think so we can help further if need be.

To run the code, press Alt+F8, make sure that the macro name is high-lighted then click on Run.

Cheerio,
vcoolio.
Hi. I won't be back in the office to try this for a few days. I will try it and let you know. Thanks so much!
Posts
1260
Registration date
Thursday July 24, 2014
Status
Moderator
Last seen
February 3, 2020
212
Hello Susan,

No worries.

It may be worth uploading a sample of your work book so that we can rummage through it and make things happen for you.

To upload a sample, use a free file sharing site such as DropBox, ge.tt or SpeedyShare then post the link to your file back here. Be careful with any sensitive data.

Cheerio,
vcoolio.