ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   hide/unhide cell when clicking a cmdbutton (https://www.excelbanter.com/excel-programming/313152-hide-unhide-cell-when-clicking-cmdbutton.html)

harder1216

hide/unhide cell when clicking a cmdbutton
 

hide/unhide cell when clicking a cmdbutton

--------------------------------------------------------------------------------

hi! im a new member here.

just want to ask for help.

how can i hide/unhide cell when clicking a cmd button.

for example:

when i click the button "November" the data of november
will appear(b3:f25) but when i click again the button november,
it will hide the cell i just viewed.

thank you.[/COLOR

--
harder121
-----------------------------------------------------------------------
harder1216's Profile: http://www.excelforum.com/member.php...fo&userid=1516
View this thread: http://www.excelforum.com/showthread.php?threadid=26813


JulieD

hide/unhide cell when clicking a cmdbutton
 
Hi

the problem is that you can't hide just cells - you need to hide either rows
or columns .. so if you're happy for columns B:F to be hidden when you click
your button then

sub ToggleNovember()

Columns("B:F").Select
if Selection.EntireColumn.Hidden = True then
Selection.EntireColumn.Hidden = False
else
Selection.EntireColumn.Hidden = True
end if

Range("A1").select

end sub


hope this helps
Cheers
JulieD

"harder1216" wrote in message
...

hide/unhide cell when clicking a cmdbutton

--------------------------------------------------------------------------------

hi! im a new member here.

just want to ask for help.

how can i hide/unhide cell when clicking a cmd button.

for example:

when i click the button "November" the data of november
will appear(b3:f25) but when i click again the button november,
it will hide the cell i just viewed.

thank you.



--
harder1216
------------------------------------------------------------------------
harder1216's Profile:
http://www.excelforum.com/member.php...o&userid=15161
View this thread: http://www.excelforum.com/showthread...hreadid=268137
[/color]




All times are GMT +1. The time now is 12:01 AM.

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