![]() |
|
#1
|
|||
|
|||
|
I'm trying to do something simple to most. I have a drop down menu with two values, "minimal" and "low". When a person selects minimal I want a paragraph of my form to delete and when low is selected, I want the paragraph to remain. Is there a macro that can be run to do this when either value is selected or am I overthinking this and there is a simplier way of doing this? Thanks! |
|
#2
|
||||
|
||||
|
There have been numerous discussions about this kind of thing. See, for example, https://www.msofficeforums.com/word-...own-lists.html. A search will turn up plenty of others.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
#3
|
|||
|
|||
|
Thanks! Appreciate the help.
Quick question. Looks to be a character limit in the value. I have a statement that needs to appear when someone chooses an option. Is there a way to expand the character limit? If not, how could I go about adding the rest of my value for that option? |
|
#4
|
||||
|
||||
|
That link only shows one of numerous ways to 'skin the cat'. Another approach would be to embed the output text in the macro itself. For example:
Code:
Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean)
Dim StrDetails As String
With ContentControl
If .Title = "Client" Then
Select Case .Range.Text
Case "Roundhouse Nurseries"
StrDetails = "Phone: 08 1111 1111" & vbCr & _
"Fax: 08 2222 2222" & vbCr & _
"Email: sales@roundhousenurseries.com.au"
Case "Smiths Wholesales"
StrDetails = "Phone: 08 3333 3333" & vbCr & _
"Fax: 08 4444 4444" & vbCr & _
"Email: sales@smithswholesales.com.au"
Case Else: StrDetails = ""
End Select
ActiveDocument.ContentControls(2).Range.Text = StrDetails
End If
End With
End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
How to import list from Excel into drop-down list into word
|
ahw | Word VBA | 43 | 02-28-2020 08:11 PM |
| Drop down list, Can it be done??? | garethreid | Outlook | 0 | 08-09-2012 06:08 AM |
| Trouble with drop down list | yessmarie | Word VBA | 1 | 05-25-2012 12:43 PM |
Drop Down List using SYMBOLS
|
sm5948 | Word | 2 | 09-28-2011 05:05 AM |
How to unlock Drop-Down list
|
ilkks | Word | 4 | 05-06-2011 12:19 AM |