Solved

Hiding formula VBA

Posted on 2014-10-27
6
122 Views
Last Modified: 2014-10-27
Hi,

I need some vba code to hide the formulas in a range of cells "A18:W118"

I have tried to protect the range using locked/hidden and then protect sheet, however my slicers stop working then

Is there a VB solution?

Many thanks
Seamus
0
Comment
Question by:Seamus2626
6 Comments
 
LVL 2

Expert Comment

by:Glen Richmond
ID: 40406064
could always hide the formula bar?
0
 
LVL 26

Accepted Solution

by:
ProfessorJimJam earned 250 total points
ID: 40406074
Seamus2626

do the followings

select range "A18:W118"  and then right click then go to cell formatting then select custom formatting and then type three times semicolon ;;;  and then click ok.  then go to view tab and un-mark the formula bar.
0
 
LVL 2

Expert Comment

by:Glen Richmond
ID: 40406082
Ofcourse use the VBA recorder to capture the method suggested by ProfessorJimJam to include into VBA.
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 85

Expert Comment

by:Rory Archibald
ID: 40406105
If you just want to hide those formulas, you have to set the Hidden property and protect the sheet. You haven't indicated what the slicers are used for, or where they are.
0
 
LVL 10

Assisted Solution

by:GasperK
GasperK earned 250 total points
ID: 40406131
You should do exactly what you did but in the protect Sheet also select the Edit Objects and Use PivotTable & PivotChart...
You will have the formulas hidden and also, your Slicers will work.
Protect Sheet options
0
 

Author Closing Comment

by:Seamus2626
ID: 40406199
Thanks guys
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.

733 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question