using a toggle button to show or hide information in several cells

  • Thread starter Thread starter hanson
  • Start date Start date
H

hanson

I have a sheet that contains confidential information and only want it
visible when I need it. I can insert all the different buttons and boxes but
can not seem to get them to do this.
 
If the information is a whole row/column, you could record of macro of you
hiding the rows, and unhiding the rows (seperate recordings, of course)

Then just assign the macros to two buttons
 
Luke

Why not just one button to toggle hide or not hide?

Sub togglerows()
Dim rng As Range
Dim Cell As Range
Set rng = ActiveSheet.Range("A10:A14")
rng.EntireRow.Hidden = Not rng.EntireRow.Hidden
End Sub


Gord Dibben MS Excel MVP
 
You cannot hide individual cells.

Rows or columns, yes.

You can use Custom Views to set up differing views or use the ToggleRows code I
posted in my other posting in this thread.

As far as hiding "confidential" information, my rule is "if you don't want them
to see it, don't include it in the workbook".

Excel security is just weak enough that anyone with acess to the 'net and
password crackers can uncover your data.


Gord Dibben MS Excel MVP
 
Back
Top