Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Hide & Unhide with a Checkbox

I want to be able to hide and unhide rows depending if the value of a
checkbox is tru or false but I am getting no results.

Can anyone point me in the wright direction for the code? I am using the
VBA checkbox not the Forms checkbox.

Tia
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Hide & Unhide with a Checkbox

Hi Jonathan,

Try something like:

Private Sub CheckBox1_Click()
Rows("10:20").Hidden = Me.CheckBox1.Value
End Sub

---
Regards,
Norman



"Jonathan" wrote in message
...
I want to be able to hide and unhide rows depending if the value of a
checkbox is tru or false but I am getting no results.

Can anyone point me in the wright direction for the code? I am using the
VBA checkbox not the Forms checkbox.

Tia



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Hide & Unhide with a Checkbox

Thnx Norman I'll givie it whirl

"Norman Jones" wrote:

Hi Jonathan,

Try something like:

Private Sub CheckBox1_Click()
Rows("10:20").Hidden = Me.CheckBox1.Value
End Sub

---
Regards,
Norman



"Jonathan" wrote in message
...
I want to be able to hide and unhide rows depending if the value of a
checkbox is tru or false but I am getting no results.

Can anyone point me in the wright direction for the code? I am using the
VBA checkbox not the Forms checkbox.

Tia




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Hide & Unhide with a Checkbox

Thanks Norman,

What I mean (have tested and it's fab) but the rows will start hidden on the
sheet - when the user check's the box and creates the Value "True" I want the
rows to be visible when the box is unchecked and the value "False" I want the
rows to be hidden.

Can you help?

"Norman Jones" wrote:

Hi Jonathan,

Try something like:

Private Sub CheckBox1_Click()
Rows("10:20").Hidden = Me.CheckBox1.Value
End Sub

---
Regards,
Norman



"Jonathan" wrote in message
...
I want to be able to hide and unhide rows depending if the value of a
checkbox is tru or false but I am getting no results.

Can anyone point me in the wright direction for the code? I am using the
VBA checkbox not the Forms checkbox.

Tia




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Hide & Unhide with a Checkbox

Hi Jonathan,

What I mean (have tested and it's fab) but the rows will start hidden on
the
sheet - when the user check's the box and creates the Value "True" I want
the
rows to be visible when the box is unchecked and the value "False" I want
the
rows to be hidden.



Try:

Private Sub CheckBox1_Click()
Rows("10:20").Hidden = Not (Me.CheckBox1.Value)
End Sub


---
Regards,
Norman



"Jonathan" wrote in message
...
Thanks Norman,

What I mean (have tested and it's fab) but the rows will start hidden on
the
sheet - when the user check's the box and creates the Value "True" I want
the
rows to be visible when the box is unchecked and the value "False" I want
the
rows to be hidden.

Can you help?

"Norman Jones" wrote:

Hi Jonathan,

Try something like:

Private Sub CheckBox1_Click()
Rows("10:20").Hidden = Me.CheckBox1.Value
End Sub

---
Regards,
Norman



"Jonathan" wrote in message
...
I want to be able to hide and unhide rows depending if the value of a
checkbox is tru or false but I am getting no results.

Can anyone point me in the wright direction for the code? I am using
the
VBA checkbox not the Forms checkbox.

Tia








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 138
Default Hide & Unhide with a Checkbox

Thanks Norman your a star!

"Norman Jones" wrote:

Hi Jonathan,

What I mean (have tested and it's fab) but the rows will start hidden on
the
sheet - when the user check's the box and creates the Value "True" I want
the
rows to be visible when the box is unchecked and the value "False" I want
the
rows to be hidden.



Try:

Private Sub CheckBox1_Click()
Rows("10:20").Hidden = Not (Me.CheckBox1.Value)
End Sub


---
Regards,
Norman



"Jonathan" wrote in message
...
Thanks Norman,

What I mean (have tested and it's fab) but the rows will start hidden on
the
sheet - when the user check's the box and creates the Value "True" I want
the
rows to be visible when the box is unchecked and the value "False" I want
the
rows to be hidden.

Can you help?

"Norman Jones" wrote:

Hi Jonathan,

Try something like:

Private Sub CheckBox1_Click()
Rows("10:20").Hidden = Me.CheckBox1.Value
End Sub

---
Regards,
Norman



"Jonathan" wrote in message
...
I want to be able to hide and unhide rows depending if the value of a
checkbox is tru or false but I am getting no results.

Can anyone point me in the wright direction for the code? I am using
the
VBA checkbox not the Forms checkbox.

Tia






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Checkbox to hide/unhide named range Joel Mills Excel Programming 3 May 25th 05 04:38 PM
Hide / Unhide Columns with checkbox Sige Excel Programming 4 May 9th 05 11:43 AM
hide or unhide pivotfield using a checkbox Richard[_33_] Excel Programming 0 February 10th 05 12:02 PM
Checkbox to hide and unhide rows Please. Steved Excel Worksheet Functions 2 December 6th 04 11:30 PM
Checkbox Control to Hide/Unhide Worksheet Peter[_29_] Excel Programming 2 October 24th 03 05:00 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"