Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 07-20-2023, 11:39 AM
OldDogNewVisio OldDogNewVisio is offline How To Populate A Text Box From A ComboBox In Visio Windows 11 How To Populate A Text Box From A ComboBox In Visio Office 2016
Novice
How To Populate A Text Box From A ComboBox In Visio
 
Join Date: Jul 2023
Location: Florida
Posts: 7
OldDogNewVisio is on a distinguished road
Default How To Populate A Text Box From A ComboBox In Visio

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How To Populate A Text Box From A ComboBox In Visio How to populate a userform combobox from a table in the same document jrooney7 Word VBA 2 04-14-2019 06:30 PM
How To Populate A Text Box From A ComboBox In Visio How to populate a userform combobox from an excel worksheet jrooney7 Word VBA 14 09-16-2018 08:52 PM
How To Populate A Text Box From A ComboBox In Visio Populate Combobox from Excel into a Word UserForm 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
How To Populate A Text Box From A ComboBox In Visio how to populate textbox based on combobox selection in word IvanGeorgiev Word VBA 1 02-21-2013 07:28 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:43 AM.


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