LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 355
Default Cell click

Hello
I would like to be able to click on cell A25 and hide any rows in 26-44 that
have an 1 in Col A. I can use this code to hide the rows using a button, but
I am not sure how to incorporate the click event to fire the mcaro.
My code :

rivate Sub CommandButton1_Click()

Application.ScreenUpdating = False
Dim I As Long
Dim Hidden As Boolean
For I = 26 To 44
If Rows(I).EntireRow.Hidden Then
Hidden = True
Rows(I).EntireRow.Hidden = False
End If
Next I
If Hidden Then Exit Sub
For I = 26 To 44 Step 1
If Cells(I, 1).Value = 1 Then
Range(Cells(I, 1), Cells(I, 1)).EntireRow.Hidden = True
End If
Next I

End Sub

Thanks for your help


 
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
Hyperlink from one.xlsx cell to another two.xlxs cell & click back Bobbi-Joe Excel Worksheet Functions 1 August 7th 09 07:18 PM
How do I double click a cell and jump to cell's referenced cell JerryJuice Excel Discussion (Misc queries) 2 September 10th 05 10:24 PM
Click on graph bar to execute a double-click in a pivot table cell [email protected] Charts and Charting in Excel 4 August 3rd 05 01:37 AM
Click on cell-calendar drops down-click on date-date fills cell. . George Setting up and Configuration of Excel 1 April 15th 05 08:22 AM
Want to be able to click on a cell and have a list box appear to give values to populate a cell Richard Zellmer Excel Programming 2 September 16th 03 11:12 PM


All times are GMT +1. The time now is 09:14 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"