ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Hide Formula (or Lock Cell) using VBA (https://www.excelbanter.com/excel-programming/320141-hide-formula-lock-cell-using-vba.html)

Aaron5

Hide Formula (or Lock Cell) using VBA
 
I would like to distribute a spreadsheet but and hide the formula. I know I
could use the Excel lock feature (password optional), but I would rather use
VBA as the users have a tendency to alter the (very long) formulas.

Thanks in advance.

Ben

Hide Formula (or Lock Cell) using VBA
 
what I usually do is just fill the cell formulas from VBA ie... leave them
blank right until they are needed. ex
in vba
range("a1").formular1cr = "=sum(r3c5:r6c7)"


"Aaron5" wrote:

I would like to distribute a spreadsheet but and hide the formula. I know I
could use the Excel lock feature (password optional), but I would rather use
VBA as the users have a tendency to alter the (very long) formulas.

Thanks in advance.


Aaron5

Hide Formula (or Lock Cell) using VBA
 
Thanks Ben. However, like I have mentioned before that the existing
spreadsheet have huge amount of very long formulas (arrays). So it would not
be feasible to start from scratch (and I am not great with VBA to say the
least).




"ben" wrote:

what I usually do is just fill the cell formulas from VBA ie... leave them
blank right until they are needed. ex
in vba
range("a1").formular1cr = "=sum(r3c5:r6c7)"


"Aaron5" wrote:

I would like to distribute a spreadsheet but and hide the formula. I know I
could use the Excel lock feature (password optional), but I would rather use
VBA as the users have a tendency to alter the (very long) formulas.

Thanks in advance.



All times are GMT +1. The time now is 05:38 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com