Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Automatic Hide/Unhide Programming

On Wed, 20 May 2009 11:47:02 -0700 (PDT),
wrote:
I'm wanting to create conditional formatting such that when users
submit info in one cell, a previously hidden row underneath it becomes
unhidden and available for formatting. Is there a way to do that?
================================================== ===
On May 20, 2:53 pm, Gord Dibben <gorddibbATshawDOTca wrote:
Not using Conditional Formatting.
You would need event code to achieve the unhiding of a row.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("A1")) Is Nothing Then Exit Sub
On Error GoTo endit
Application.EnableEvents = False
If Target.Value < "" Then
Rows("2:2").EntireRow.Hidden = False
End If
endit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View
Code".

Paste the code into that module. Edit to suit then Alt + q to return
to the Excel window.

Gord Dibben MS Excel MVP
================================================== ===
I'm relatively new to VBA, what exactly should I be looking to edit?
================================================== ===
I used A1 as the input cell and row 2 as the row to unhide.

You would have to edit those to suit.

Would you be wanting this for more than a single cell or single row?

Post some details.......cell references and row numbers.

Gord
================================================== ===
Essentially, I'm creating a sheet that contains three categories of
employees. Under each of these categories, I have as many rows as
there are people in that particular category. By default, no
employees names are chosen. The first column contains data
validation
lists containing all employees in each category. What I'm wanting to
have happen is when a user chooses someone from the list on the first
row, the next row becomes available for selection. I'd like for it
to
continue down the list, until it reaches the end of each category.

For instance, B4 is the first blank cell. When an employee is chosen
for cell B4, I want row 5 to become available. When B5 is chosen,
row
6 opens, etc. Each category ideally would only contain 45-50 names.


Thanks again for all the help!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Automatic Hide/Unhide Programming

not really formatting
you can use the CHANGE event to unhide a row beneath the changed cell ...
Gord's code did that

you might add

Rows("2:2")..RowHeight = 13.5

in case this went to zero
]

wrote in message
...
On Wed, 20 May 2009 11:47:02 -0700 (PDT),
wrote:
I'm wanting to create conditional formatting such that when users
submit info in one cell, a previously hidden row underneath it becomes
unhidden and available for formatting. Is there a way to do that?
================================================== ===
On May 20, 2:53 pm, Gord Dibben <gorddibbATshawDOTca wrote:
Not using Conditional Formatting.
You would need event code to achieve the unhiding of a row.

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Me.Range("A1")) Is Nothing Then Exit Sub
On Error GoTo endit
Application.EnableEvents = False
If Target.Value < "" Then
Rows("2:2").EntireRow.Hidden = False

Rows("2:2")..RowHeight = 13.5 ' ***** HERE <<================
End If
endit:
Application.EnableEvents = True
End Sub

This is sheet event code. Right-click on the sheet tab and "View
Code".

Paste the code into that module. Edit to suit then Alt + q to return
to the Excel window.

Gord Dibben MS Excel MVP
================================================== ===
I'm relatively new to VBA, what exactly should I be looking to edit?
================================================== ===
I used A1 as the input cell and row 2 as the row to unhide.

You would have to edit those to suit.

Would you be wanting this for more than a single cell or single row?

Post some details.......cell references and row numbers.

Gord
================================================== ===
Essentially, I'm creating a sheet that contains three categories of
employees. Under each of these categories, I have as many rows as
there are people in that particular category. By default, no
employees names are chosen. The first column contains data
validation
lists containing all employees in each category. What I'm wanting to
have happen is when a user chooses someone from the list on the first
row, the next row becomes available for selection. I'd like for it
to
continue down the list, until it reaches the end of each category.

For instance, B4 is the first blank cell. When an employee is chosen
for cell B4, I want row 5 to become available. When B5 is chosen,
row
6 opens, etc. Each category ideally would only contain 45-50 names.


Thanks again for all the help!


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
Automatic Unhide bbb973 Excel Discussion (Misc queries) 1 October 8th 09 07:22 PM
Hide/Unhide row VBA Scafidel[_2_] Excel Discussion (Misc queries) 1 March 23rd 09 05:28 PM
automatic unhide when editing problem Mark Excel Worksheet Functions 0 October 6th 06 08:47 PM
Hide/Unhide Help Danno[_7_] Excel Programming 3 July 26th 06 05:43 PM
Hide/Unhide cells using VBA programming Thulasiram Excel Programming 3 July 21st 06 11:12 PM


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