Is there a file saver Macro generator?

excelos

Well-known Member
Joined
Sep 25, 2011
Messages
591
Office Version
  1. 365
Platform
  1. Windows
Hello

I have created a sheet with lots of formulas and text after a lot of effort and time.

I want to make a Macro that will just create that sheet and type everything that I have typed.

The suggested method to go through every cell and click F2 and then Enter, while recording a Macro, is not applicable because I have hundreds of cells filled.

Any idea?
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
HelloI have created a sheet with lots of formulas and text after a lot of effort and time.I want to make a Macro that will just create that sheet and type everything that I have typed.The suggested method to go through every cell and click F2 and then Enter, while recording a Macro, is not applicable because I have hundreds of cells filled.Any idea?
Do you need to create the sheet every time? If you saved it as a template you could load it and it would be ready for use.
 
Upvote 0
If you do this manually, does it do what you want?
right-click on sheet tab \ Move or Copy \ Create a Copy \ OK

If so:
Code:
Sub CopyActiveSheet()
    ActiveSheet.Copy Before:=ActiveSheet
End Sub
 
Upvote 0
If you do this manually, does it do what you want?
right-click on sheet tab \ Move or Copy \ Create a Copy \ OK

If so:
Code:
Sub CopyActiveSheet()
    ActiveSheet.Copy Before:=ActiveSheet
End Sub

I don't want to copy the sheet, I want to generate it!
 
Upvote 0
That may be a solution, how do I do that?
This is part of the code for one of my programs. Further lines copy downloaded data from a second file, redefine named ranges depending on the number of lines, and update (not create) pivot tables. Presumably similar to what you've just done, but if I want to change the layout I edit the template rather than the code. Workbooks.Open Filename:= "DETAILED-TRIAL-BALANCE-TEMPLATE.xlsx"
 
Upvote 0
This is part of the code for one of my programs. Further lines copy downloaded data from a second file, redefine named ranges depending on the number of lines, and update (not create) pivot tables. Presumably similar to what you've just done, but if I want to change the layout I edit the template rather than the code. Workbooks.Open Filename:= "DETAILED-TRIAL-BALANCE-TEMPLATE.xlsx"

Thanks but how/where do I save the template?
Will the template load the references to a specifically named sheet?
 
Upvote 0
Thanks but how/where do I save the template?
Will the template load the references to a specifically named sheet?

I need to load the template as sheet in the current workbook, because it has references to the current's workbook sheet.
 
Upvote 0
Apologies for the delay. I have to reply from home as the board is often blocked at work.

Hopefully our approaches are not that different. I save the template in a specific folder and the code is in a different file. It works on the template creates a file name which is derived from the month. It is the file name that changes, not the tab names.
 
Upvote 0

Forum statistics

Threads
1,213,539
Messages
6,114,221
Members
448,554
Latest member
Gleisner2

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