Copy/Paste Macro Not Working Correctly

dgeorge

New Member
Joined
Oct 3, 2017
Messages
10
Hello,

I am trying to record a macro that copies an entire worksheet to the next worksheet (tab). The original worksheet has 4 macro buttons currently (one of which is the macro to do this copy/paste). When I run the macro below, it copies and pastes to the next tab but pastes as a picture and is very blurry and unreadable. When recording the macro itself, the process works perfectly. Or when doing the simple copy/paste to the next tab it works perfectly. Why won't the recorded macro do the same?

Here is the VBA:

Cells.Select
Selection.Copy
ActiveSheet.Next.Select
Cells.Select
ActiveSheet.Buttons.Add(160.5, 471, 145.5, 18.75).Select
ActiveSheet.Buttons.Add(4.5, 471.75, 145.5, 18.75).Select
ActiveSheet.Buttons.Add(316.5, 471, 135.75, 18.75).Select
ActiveSheet.Buttons.Add(894.75, 302.25, 169.5, 121.5).Select
ActiveSheet.Paste
Range("A1").Select
End Sub

Any help would be greatly appreciated.

Thanks!!
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
If all you want to do is create as new copy of the sheet, complete with buttons, try
Code:
Sub Chk()
ActiveSheet.copy after:=ActiveSheet
End Sub
 
Upvote 0
Thanks for your help. I can work with this, however, is there a way to copy to the next pre-existing sheet? This is for a golf league and I already have a tab set up for each week. I currently have tabs for WK1, WK2....WK16, all of which are blank except WK1. Your code creates WK1 (2). I can make this work, just wondered if there was a way to "copy to next" instead of "copy after" like your code.

Thanks!!
 
Upvote 0
In that case try
Code:
Cells.copy ActiveSheet.Next.Range("A1")
ActiveSheet.Next.Select
ActiveSheet.Range("A1").Select
 
Upvote 0
Glad to help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,173
Members
453,021
Latest member
Justyna P

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