View Single Post
 
Old 08-06-2017, 02:44 PM
NoSparks NoSparks is offline Windows 7 64bit Office 2010 64bit
Excel Hobbyist
 
Join Date: Nov 2013
Location: British Columbia, Canada
Posts: 842
NoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of lightNoSparks is a glorious beacon of light
Default

Application.Volatile tells me this is a udf that recalculates every time anything on the sheet gets calculated.

As a udf it is required to be in a General Module. Modules are not copied into new workbooks that are created.

Ok, so what to do about it.... 3 possibilities come to mind

1.) If it's not necessary for things in the saved file to be recalculated, and I doubt it is because you are printing then saving what was printed, save the cell contents as values, that would overwrite the formula in the cell with what's being displayed.

2.) Store the functions on the sheet module and use the WorkSheet_Change event on the specific cells to use the functions to fill in those cells. This would then all be copied with the sheet.

3.) Export the General Module to a file and Import it into the newly created workbook. I believe this requires changing settings in the trust center which is probably best to avoid.
Here's a link you might want to have a look at http://www.cpearson.com/excel/vbe.aspx

Last edited by NoSparks; 08-06-2017 at 02:58 PM. Reason: added link to chip's site
Reply With Quote