Macro to copy cells with borders and text from one sheet to another

richardgmurillo

New Member
Joined
Dec 5, 2018
Messages
6
I am working on a workbook that will contain a form for me to fill out regarding customers. I have completed a blank form and I have used a second worsheet to have a blank copy of the form and on worksheet1 is where the worksheet will go where I will fill out. I have worked on a macro where when I click a "click here" button it will past a blank sheet on the next available row. I searched online and came up with a macro for the cutton to copy the form from the second sheet and past it on the first sheet. The macro works but it does not copy the borders of the cell. Is there any way to code it so that it copies the borders as well so I can have a complete form to fill out everytime I get a new customer, Thanks.
 
Try:

Code:
[COLOR=#333333][FONT=Courier][COLOR=#000000]Application.ScreenUpdating= False[/COLOR][/FONT][/COLOR]
[COLOR=#333333][FONT=Courier][COLOR=#000000]Dim copySheet As Worksheet[/COLOR][/FONT][/COLOR]
[COLOR=#333333][FONT=Courier][COLOR=#000000]Dim pasteSheet As Worksheet[/COLOR][/FONT][/COLOR]

[COLOR=#333333][FONT=Courier][COLOR=#000000]Set copySheet =Worksheets("Sheet2")[/COLOR][/FONT][/COLOR]
[COLOR=#333333][FONT=Courier][COLOR=#000000]Set pasteSheet =Worksheets("Sheet1")[/COLOR][/FONT][/COLOR]

[COLOR=#333333][FONT=Courier][COLOR=#000000]copySheet.Range("A1:O16").Copy[/COLOR][/FONT][/COLOR]
[COLOR=#333333][FONT=Courier][COLOR=#000000]pasteSheet.Cells(Rows.Count,1).End(xlUp).Offset(1, 0).PasteSpecial xlPasteValues
[/COLOR][/FONT][/COLOR][COLOR=#000000][FONT=Courier]pasteSheet.Cells(Rows.Count,1).End(xlUp).Offset(1, 0).PasteSpecial [/FONT][/COLOR][COLOR=#333333]xlFormats[/COLOR][COLOR=#000000][FONT=Courier]
[/FONT][/COLOR][COLOR=#333333][FONT=Courier][COLOR=#000000]Application.CutCopyMode = False
[/COLOR][/FONT][/COLOR]
 
Upvote 0

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop

Forum statistics

Threads
1,215,684
Messages
6,126,199
Members
449,298
Latest member
Jest

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