Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-05-2017, 10:04 AM
Whytewhysper Whytewhysper is offline Using a drop down list in a macro Windows 10 Using a drop down list in a macro Office 2016
Novice
Using a drop down list in a macro
 
Join Date: Jul 2017
Location: Aurora, CO
Posts: 2
Whytewhysper is on a distinguished road
Default Using a drop down list in a macro

Hello,



I believe this needs to be moved to the VBA forum.
I want to have a drop down list used in a macro. Is it possible to have the drop down list appear in the InputBox? If so, what would the VBA code look like to make this happen?

What I am attempting to do is provide a list of vendors to choose from through a macro that is currently using InputBox for the person to enter the data. The list of vendors will help decrease typos and incorrect vendor names appearing in the document that is being using to help populate an email. I am really new to the VBA coding but not so new to programming and macro creation. I do not know if what I am asking is possible or if I need to take a different approach to yield the same results.

Tim M aka Whytewhysper

Last edited by Whytewhysper; 07-05-2017 at 12:13 PM.
Reply With Quote
  #2  
Old 07-05-2017, 02:38 PM
macropod's Avatar
macropod macropod is offline Using a drop down list in a macro Windows 7 64bit Using a drop down list in a macro Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,375
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

An InputBox cannot be made to function as a dropdown; you'd need a userform for that. The most you could do with an InputBox is to display a list (e.g. numbered) and have the user select an item from that list (e.g. input the corresponding item number).
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 07-06-2017, 04:02 AM
gmayor's Avatar
gmayor gmayor is offline Using a drop down list in a macro Windows 10 Using a drop down list in a macro Office 2016
Expert
 
Join Date: Aug 2014
Posts: 4,138
gmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud ofgmayor has much to be proud of
Default

You could start by looking at the example at https://www.msofficeforums.com/word/...uggestion.html which employs a simple userform populated from an Excel workbook. It wouldn't be too difficult to modify that to use your vendors' information to populate your document.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a drop down list in a macro How to import list from Excel into drop-down list into word ahw Word VBA 43 02-28-2020 08:11 PM
Using a drop down list in a macro Having a Drop-down list in Word referring to an Excel list celias Word VBA 3 07-11-2016 11:40 PM
Using a drop down list in a macro Drop Down List Help ksigcajun Word 3 05-09-2014 05:35 AM
Drop down list, Can it be done??? garethreid Outlook 0 08-09-2012 06:08 AM
Using a drop down list in a macro Drop Down List Question beb1227 Excel 6 12-08-2011 07:26 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:48 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