Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 87
Default Hiding/Unhiding Rows in a worksheet based on the value of a checkbox.

Hi,

I am using the following code to try and hide/unhide a row in a
worksheet. It hides the row just fine, but it won't unhide it. What
am I doing wrong??

If ActiveSheet.OLEObjects(1).Object.Value = True Then
ActiveSheet.Range("EURUSD").EntireRow.Hidden = False
Else
ActiveSheet.Range("EURUSD").EntireRow.Hidden = True
End If

I tried this code before and it didn't work either.

sheets("Data Layout").Range("EURUSD").EntireRow.Hidden= _
Not sheets("Data Layout").OleObjects(1).object.value

Much simpler, I only wish I could get it to work...Any ideas?

Thanks

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 192
Default Hiding/Unhiding Rows in a worksheet based on the value of a checkb

I would recommend event programming like the following:

Private Sub CheckBox1_Click()

If ActiveSheet.CheckBox1.Value = True Then
ActiveSheet.Range("EURUSD").EntireRow.Hidden = False
Else
ActiveSheet.Range("EURUSD").EntireRow.Hidden = True
End If

End Sub

--
-SA


"R Tanner" wrote:

Hi,

I am using the following code to try and hide/unhide a row in a
worksheet. It hides the row just fine, but it won't unhide it. What
am I doing wrong??

If ActiveSheet.OLEObjects(1).Object.Value = True Then
ActiveSheet.Range("EURUSD").EntireRow.Hidden = False
Else
ActiveSheet.Range("EURUSD").EntireRow.Hidden = True
End If

I tried this code before and it didn't work either.

sheets("Data Layout").Range("EURUSD").EntireRow.Hidden= _
Not sheets("Data Layout").OleObjects(1).object.value

Much simpler, I only wish I could get it to work...Any ideas?

Thanks


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
hiding/unhiding rows Art Excel Worksheet Functions 1 March 16th 10 05:00 PM
unhiding and hiding rows Paul_of_Abingdon[_2_] Excel Discussion (Misc queries) 2 March 6th 08 03:22 PM
Hiding / unhiding rows based on change of a cell jack[_2_] Excel Programming 8 November 18th 07 05:24 AM
Hiding/unhiding rows Matheus Excel Discussion (Misc queries) 2 November 11th 07 11:20 PM
Hiding/Unhiding rows Arne Hegefors Excel Programming 2 July 21st 06 08:19 AM


All times are GMT +1. The time now is 11:29 PM.

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

About Us

"It's about Microsoft Excel"