![]() |
#1
|
|||
|
|||
![]()
We use Visio for our SharePoint Site. I have been asked to streamline things. Instead of posting the entire org chart, I have created a ComboBox that allows visitors to our site to select the department they are looking for and I would like to have the name of the lead for that department populate in a text box next to the dropdown list. I have created the subroutine for the dropdown list that opens when the SharePoint opens. I have added the list of department names (Example) as follows:
ComboBox2.AddItem ("Accounting") ComboBox2.AddItem ("Maintenance") ComboBox2.AddItem ("Commissary") ComboBox2.AddItem ("Sales") ComboBox2.AddItem ("Field Reps") End Sub I have created the text box statement as a long string if statement (example) as follows: If (ComboBox2.Value= "Accounting") Then Textbox1.Value = "Mary Smith" ElseIf (ComboBox2.Value= "Maintenance") Then Textbox1.Value = "Fred Jones" ElseIf (ComboBox2.Value= "Commissary") Then Textbox1.Value = "Jose Lima" ElseIf (ComboBox2.Value= "Sales") Then Textbox1.Value = "Rick Nixon" ElseIf (ComboBox2.Value= "Field Reps") Then Textbox1.Value = "Sandy Banning" End If End Sub These are only examples. I can't post the real thing but they are close approximations of what I'm doing. How do I get the two pieces to work together? I have loaded the ComboBox statement on the "Document" page in the VB editor but where do I put the If Statement text for the TextBox? Thanks so much!! |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
jrooney7 | Word VBA | 2 | 04-14-2019 06:30 PM |
![]() |
jrooney7 | Word VBA | 14 | 09-16-2018 08:52 PM |
![]() |
ferguson4848 | Word VBA | 3 | 10-28-2016 09:05 PM |
how to populate textbox based on combobox selection in word | IvanGeorgiev | Word | 1 | 02-21-2013 07:32 PM |
![]() |
IvanGeorgiev | Word VBA | 1 | 02-21-2013 07:28 PM |