![]() |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
Can anybody help... I'm trying to create a word document well an order form actually with lines of products each of which can have several variants with a different value hence the drop-down list. I want to be able for the user on choosing the product's variant to see it's value in the adjacent text box/field. My aim is to have a final shopping list as it were and on each line a value with a total at the bottom. I have figured out the maths bit and am able to total the numbers at the end, what I can't manage is to create more than one drop-down list and auto text box. Hope that makes sense and someone is able to help.
This is the code I'm using to populate the text box with a value. Option Explicit Private Sub Document_ContentControlOnExit(ByVal ContentControl As ContentControl, Cancel As Boolean) Dim i As Long, StrDetails As String With ContentControl If .Title = "Choice1" Then For i = 1 To .DropdownListEntries.Count If .DropdownListEntries(i).Text = .Range.Text Then StrDetails = Replace(.DropdownListEntries(i).Value, "|", Chr(11)) Exit For End If Next ActiveDocument.ContentControls(2).Range.Text = StrDetails End If End With End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Populate Word Drop-down list with Excel column then auto fill form fields with Excel data | Faldinio | Word VBA | 7 | 10-19-2014 06:03 AM |
Link multiple cells in drop-down lists | Trial4life | Excel | 0 | 09-08-2014 05:08 AM |
![]() |
teza2k06 | Word | 1 | 04-29-2014 04:54 PM |
Multiple Drop Down Lists in word | ali212006 | Word | 3 | 03-13-2013 12:16 PM |
Using both drop down lists and blank cells for text | voltarei | Word | 0 | 03-18-2010 04:16 AM |