blacktusk
05-28-2009, 07:15 PM
I have a worksheet that is using VBA to generate a report based on SQL Server data. The worksheet displays the data and dynamically calculates the print area. The user can popup a calendar to select a specific day, and rerun the report.
However, there are a number of Heading cells and calculated cells in the header area that I do not want modified by the user. I cannot protect the worksheet as the report will no longer generate, and I cant use Range unprotect cells as the dynamic report data size is unknown.
I was hoping to be able to create another worksheet that is a view only of the formatted report data, however, if I use the =Report!xy syntax in all the cells of the view worksheet I will get data in cells that have no content in the source worksheet.
Is there a relatively simple method using VBA that could be used to dynamically replicate the formatted report data into another worksheet?
Or, alternatively a way to protect only the header section of my worksheet?
However, there are a number of Heading cells and calculated cells in the header area that I do not want modified by the user. I cannot protect the worksheet as the report will no longer generate, and I cant use Range unprotect cells as the dynamic report data size is unknown.
I was hoping to be able to create another worksheet that is a view only of the formatted report data, however, if I use the =Report!xy syntax in all the cells of the view worksheet I will get data in cells that have no content in the source worksheet.
Is there a relatively simple method using VBA that could be used to dynamically replicate the formatted report data into another worksheet?
Or, alternatively a way to protect only the header section of my worksheet?