Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Excel question

Hi all! I'm trying to accomplish the following through Excel, either
via programming or other:

I've created a questionnaire on one of the Sheets in Excel. There are a
total of 10 questions on the Sheet; for 3 of the 10 questions, a "Yes"
or "No" is the answer (delivered by a drop down list) - if the user
selects "Yes", I want Excel to unhide 4 rows beneath the question in
order to reveal 4 more sub-questions. If the answer is "No", the rows
remain hidden and the user goes on to the next question. Please help...

Thanks in advance...

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Excel question

Private Sub Worksheet_Change(ByVal Target As Range)

On Error GoTo ws_exit:
Application.EnableEvents = False
If Not Intersect(Target, Me.Range("H1:H100")) Is Nothing Then
With Target
If .Value = "Yes" Then
.Offset(1, 0).Resize(4, 1).EntireRow.Hidden = False
Else
.Offset(1, 0).Resize(4, 1).EntireRow.Hidden = True
End If
End With
End If

ws_exit:
Application.EnableEvents = True
End Sub

'This is worksheet event code, which means that it needs to be
'placed in the appropriate worksheet code module, not a standard
'code module. To do this, right-click on the sheet tab, select
'the View Code option from the menu, and paste the code in.


--

HTH

RP
(remove nothere from the email address if mailing direct)


wrote in message
oups.com...
Hi all! I'm trying to accomplish the following through Excel, either
via programming or other:

I've created a questionnaire on one of the Sheets in Excel. There are a
total of 10 questions on the Sheet; for 3 of the 10 questions, a "Yes"
or "No" is the answer (delivered by a drop down list) - if the user
selects "Yes", I want Excel to unhide 4 rows beneath the question in
order to reveal 4 more sub-questions. If the answer is "No", the rows
remain hidden and the user goes on to the next question. Please help...

Thanks in advance...



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
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 0 April 27th 05 07:46 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 23 April 23rd 05 09:26 PM
Good morning or good evening depending upon your location. I want to ask you the most important question of your life. Your joy or sorrow for all eternity depends upon your answer. The question is: Are you saved? It is not a question of how good you [email protected] Excel Programming 0 April 22nd 05 03:30 PM


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