Replicate Report Borders and other Formatting in VBA Module

ExcelSeriousFun

New Member
Joined
Mar 21, 2014
Messages
13
I have "inherited" several reports for Excel 2010 where the data is generated via VBA but the formatting of the reports, including borders, merged cells, font styles, etc were manually added to the sheets. I wish to replicate these formatted characteristics into the VBA modules that create the data. In that way if I have 20 reports that I wish to create, I could use only a single sheet rather than 20. I'm doing this to simplify the output as well as to reduce the size of my workbook.

I suppose that ideally I'd like to have a sort of VBA generator to be able to insert the report formatting into a VBA module.

Thank you for considering this.
 

Excel Facts

Back into an answer in Excel
Use Data, What-If Analysis, Goal Seek to find the correct input cell value to reach a desired result
Welcome to MrExcel.

You can use macro recorder to generate the preliminary code for formatting. Once this is done then you will have to incorporate in the inherited code or call it from there.

If formatting pattern is the same then it will be easier to maintain the code.
 
Upvote 0
Thank you for your reply. I am hoping to NOT replicate the borders and other cell formatting. I'm looking for some sort of VBA generator that, given a range of cells on an existing report, will generate VBA formatting code identical to the existing report. Then, I would paste the VBA code into the report-generating module.

Thank you.
 
Upvote 0

Forum statistics

Threads
1,216,076
Messages
6,128,670
Members
449,463
Latest member
Jojomen56

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