Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 21
Default Populate Comment on the basis of Text Box Entry

Hi

I am building an small interactive questionnaire.

I am using Data Validation Lists to get responses for the questions. I
have a few questions where on the basis of the choice made, I need to
capture some more data. (currently I am thinking this could be a text
box though my ideal preference would be for a option button.). What I
want to know is if some text is entered in the box, is it possible for
me to insert that text as a "Comment" in the same cell?

Example: I have a list: A, B, C, D. On selecting C, I want a text
box / Option Button list to pop up. I either enter the text (or select
radio button). The entered text (or text associated with selected
radio button) should be populated as the comment for the cell.

This will significantly simplify my questionnaire design. It will also
help if you let me know how this would be different if the text can be
placed in another Cell (instead of a comment)

Any help is greatly appreciated.

Best
Prasad
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Populate Comment on the basis of Text Box Entry

You could write event code to monitor the Change() event of the worksheet.

For example,

Private Sub Worksheet_Change(ByVal Target As Range)

If Target.Address = "$C$5" Then
Select Case Target.Value
Case "A"
'your code for option A
Case "B"
'your code for option B
Case "C"
'your code for option C
Case "D"
'your code for option D
End Select

' insert comment
Range("A1").AddComment "You selected " & Target.Value

End if
End Sub



HTH,
JP


"EE" wrote in message
...
Hi

I am building an small interactive questionnaire.

I am using Data Validation Lists to get responses for the questions. I
have a few questions where on the basis of the choice made, I need to
capture some more data. (currently I am thinking this could be a text
box though my ideal preference would be for a option button.). What I
want to know is if some text is entered in the box, is it possible for
me to insert that text as a "Comment" in the same cell?

Example: I have a list: A, B, C, D. On selecting C, I want a text
box / Option Button list to pop up. I either enter the text (or select
radio button). The entered text (or text associated with selected
radio button) should be populated as the comment for the cell.

This will significantly simplify my questionnaire design. It will also
help if you let me know how this would be different if the text can be
placed in another Cell (instead of a comment)

Any help is greatly appreciated.

Best
Prasad



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
Deleting Rows on the basis of cell comment Radhakant Panigrahi Excel Discussion (Misc queries) 4 May 27th 10 10:04 PM
Populate xlValidateList; Please Comment AMDRIT Excel Programming 1 March 24th 06 03:52 PM
Restricting entry in B1 on the basis of entry in A1 Stilla Excel Worksheet Functions 7 December 3rd 05 09:17 PM
Restricting entry in B1 on the basis of entry in A1 Biff Excel Worksheet Functions 0 December 3rd 05 03:41 AM
Breaking text on the basis of condition jkb1249 Excel Programming 3 January 20th 04 08:04 PM


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