ACM
12-07-2010, 02:31 PM
Is there a way of hiding just the cells you highlight rather than hiding the whole row/column?
As you can see with my soccer spreadsheet, I'd like to be able to have it so whenever the user clicks on one of the 'Show/Hide' buttons at the bottom, it hides the respective home or away table. Currently, I can only seem to hide the whole columns belonging to the home or away sections.
Also, what code do I use to make the home/away section reappear? I used a recorded macro to hide it but how can I use the same button to hide it? This is what I have so far for the home section:
Sub showorhidehometable()
' hidehometable Macro
Columns("F:M").Select
Range("F2").Activate
Selection.EntireColumn.Hidden = True
End Sub
There's an image below to help you understand what I'm on about:
img80.imageshack.us/img80/81/38791923.png
As you can see with my soccer spreadsheet, I'd like to be able to have it so whenever the user clicks on one of the 'Show/Hide' buttons at the bottom, it hides the respective home or away table. Currently, I can only seem to hide the whole columns belonging to the home or away sections.
Also, what code do I use to make the home/away section reappear? I used a recorded macro to hide it but how can I use the same button to hide it? This is what I have so far for the home section:
Sub showorhidehometable()
' hidehometable Macro
Columns("F:M").Select
Range("F2").Activate
Selection.EntireColumn.Hidden = True
End Sub
There's an image below to help you understand what I'm on about:
img80.imageshack.us/img80/81/38791923.png