Copy Template sheet to new sheet in same file, and then print via form buttons

Chaotic_Cannon

New Member
Joined
Aug 30, 2011
Messages
3
Hi,

I have 2 form buttons I need to code and need help. I need one button to copy most but not all data, but all formatting from a template sheet to a new sheet in the same workbook via a form button. Then once all data is entered in the new sheet, hit another button in order to print the data without the form buttons showing in the printed version to hand to a client.

The template sheet has special formatting of column width, height, color schemes and formulas. The template will be used to create a new sheet each month. The new sheet must maintain the same formatting and formulas and copy over some column data, but not all data in columns.

I have a template worksheet in an excel file. This sheet has a brief header section where in 2 rows it shows who last update the sheet and the date.
(B2 is the Name block, and E2 is the cell where a person enters their name, B3 is the date block and E3 is the cell where the lasted updated date is entered).

Then there are a couple of blank rows (where I have form buttons placed for user input) There are 4 buttons. I have one for sorting, one for a new line entry and maintain special row formatting (both of which I have done myself) and the last 2 buttons are the "create new page" and "print"

Under the form buttons there is a table. The table headings are in rows 9 and 10 (via merged cells) and then in row 11 I have hidden in order to allow drop down menu sorting of the columns when searching for data.

Row 12 is where the data entry will start. B12 is the columns and row start of automatic numbering. As each new line entry is created via the first form button, B12 always stays as the start, although the automatic numbering makes the number always increase by 1 each time and the table gets 1 line longer at the bottom.

The table extends all the way to Column AN. Along the way some columns have drop down menus to select data from a predetermined list that I have made (and works). Other columns have formulas entered to auto calculate things. Other columns are blank and when you enter dates or data, the formulas do their work. There is also conditional formatting in the entire table that serves as a flag indicator. It makes some cells turn yellow or red depending on cell entries. Also there is conditional formatting in the entire table that makes sure that every even line is white and every odd line is gray.

So I need help with the "new page" button and the "print" button. I need to hit new page, the template gets copied to a new sheet, all the formatting is maintained (formulas, cell width, conditional formatting and copy SOME of the columns data.) Some columns have dates or equipment names I want to copy over, and other columns I just want blank in the new page.

Then when I hit the "print" button, is there a way to show a printable page of the entire page, EXCEPT the form buttons so the client can get a clean copy of the data?

Thanks for the help.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
I know my request may seem like much, so you can forget the printing portion of my request.

I just need to sort out how to copy the table over, keep all the formatting and formulas and only keep some data contained in specific columns.

If there is any way to help please it would be appreciated.

Thanks
 
Upvote 0
Ok, so I see I am not getting much help.

How about can someone help me with the basic code to simply copy 1 sheet (with ALL cells and formatting) and then it auto creates a new sheet in the same workbook?

Thanks
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,726
Members
452,939
Latest member
WCrawford

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