Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-08-2014, 11:49 AM
ksigcajun ksigcajun is offline Drop Down List Help Windows 7 64bit Drop Down List Help Office 2010 64bit
Advanced Beginner
Drop Down List Help
 
Join Date: May 2014
Posts: 76
ksigcajun is on a distinguished road
Default Drop Down List Help

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!
Reply With Quote
  #2  
Old 05-08-2014, 04:13 PM
macropod's Avatar
macropod macropod is offline Drop Down List Help Windows 7 32bit Drop Down List Help Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
  #3  
Old 05-09-2014, 05:19 AM
ksigcajun ksigcajun is offline Drop Down List Help Windows 7 64bit Drop Down List Help Office 2010 64bit
Advanced Beginner
Drop Down List Help
 
Join Date: May 2014
Posts: 76
ksigcajun is on a distinguished road
Default

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?
Reply With Quote
  #4  
Old 05-09-2014, 05:35 AM
macropod's Avatar
macropod macropod is offline Drop Down List Help Windows 7 32bit Drop Down List Help Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,963
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop Down List Help 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 Help Drop Down List using SYMBOLS sm5948 Word 2 09-28-2011 05:05 AM
Drop Down List Help How to unlock Drop-Down list ilkks Word 4 05-06-2011 12:19 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:31 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft