ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macros - Unhide and hide (https://www.excelbanter.com/excel-discussion-misc-queries/115490-macros-unhide-hide.html)

minka

Macros - Unhide and hide
 
Hi,

I'm a novice at using excel and I'm trying to create a macro that will;

When the worksheet is opened, an option can be selected (ticked).....that
will unhide all rows that have a certain value in column 'A'.

Then when this option is selected on again (unticked), it will hide rows
that have a certain value in column 'A'.



Don Guillett

Macros - Unhide and hide
 
from a post of mine just today. Was it you?

right click sheet tabview codecopy/paste thissave
now when you double click any cell in the column it will show that column
ONLY until you double click any cell in the visible column again.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If columns("iv").Hidden = True Then
columns("a:iv").EntireColumn.Hidden = False
Exit Sub
Else
columns("a:iv").EntireColumn.Hidden = True
columns(ActiveCell.Column).EntireColumn.Hidden = False
End If
End Sub



--
Don Guillett
SalesAid Software

"minka" wrote in message
...
Hi,

I'm a novice at using excel and I'm trying to create a macro that will;

When the worksheet is opened, an option can be selected (ticked).....that
will unhide all rows that have a certain value in column 'A'.

Then when this option is selected on again (unticked), it will hide rows
that have a certain value in column 'A'.





minka

Macros - Unhide and hide
 
Don....

Nop..no not me not I.

Thnx 4 your speedy reply....I'm really green when it comes 2 macros.
I tried your suggestion..but alas, it does nothing...I'm obviously not
executing something correctly..

The rows that require to be unhidden and then hidden...
have the value in column A that = calendar.

This would be facilitated by a box within the worksheet, for which the macro
will be assigned

once this box is selected, it would unhide all rows that have the value of =
calendar in column a.

when this box is selected again, it would hide the associated rows.

can this be done?

anXiously awaiting reply


"Don Guillett" wrote:

from a post of mine just today. Was it you?

right click sheet tabview codecopy/paste thissave
now when you double click any cell in the column it will show that column
ONLY until you double click any cell in the visible column again.

Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If columns("iv").Hidden = True Then
columns("a:iv").EntireColumn.Hidden = False
Exit Sub
Else
columns("a:iv").EntireColumn.Hidden = True
columns(ActiveCell.Column).EntireColumn.Hidden = False
End If
End Sub



--
Don Guillett
SalesAid Software

"minka" wrote in message
...
Hi,

I'm a novice at using excel and I'm trying to create a macro that will;

When the worksheet is opened, an option can be selected (ticked).....that
will unhide all rows that have a certain value in column 'A'.

Then when this option is selected on again (unticked), it will hide rows
that have a certain value in column 'A'.







All times are GMT +1. The time now is 09:32 AM.

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