Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Drop Down Menu


How do you create a drop down menu in VBA

example a menu with the following options

Black
Red
Gree

--
cedtech2
-----------------------------------------------------------------------
cedtech23's Profile: http://www.excelforum.com/member.php...fo&userid=3102
View this thread: http://www.excelforum.com/showthread.php?threadid=50696

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Drop Down Menu

Goto menu DataValidation, set Allow to List, and enter the values as comma
delimited list

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"cedtech23" wrote in
message ...

How do you create a drop down menu in VBA

example a menu with the following options

Black
Red
Green


--
cedtech23
------------------------------------------------------------------------
cedtech23's Profile:

http://www.excelforum.com/member.php...o&userid=31022
View this thread: http://www.excelforum.com/showthread...hreadid=506963



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Drop Down Menu


thank you for the response... I really wanted to know how to do that i
the VBA enviroment with a form. sorry I was not clea

--
cedtech2
-----------------------------------------------------------------------
cedtech23's Profile: http://www.excelforum.com/member.php...fo&userid=3102
View this thread: http://www.excelforum.com/showthread.php?threadid=50696

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Drop Down Menu

With Userform.Listbox1
.AddItem "Black"
.AddItem "Red"
.AddItem "Green"
End With

or

With Userform.Combobox1
.AddItem "Black"
.AddItem "Red"
.AddItem "Green"
End With

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"cedtech23" wrote
in message ...

thank you for the response... I really wanted to know how to do that in
the VBA enviroment with a form. sorry I was not clear


--
cedtech23
------------------------------------------------------------------------
cedtech23's Profile:

http://www.excelforum.com/member.php...o&userid=31022
View this thread: http://www.excelforum.com/showthread...hreadid=506963



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 698
Default Drop Down Menu

From the macro recorded:

Sub Macro12()

With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=
_
xlBetween, Formula1:="=$A$1:$A$3"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub

HTH
Regards,
Howard

"cedtech23" wrote in
message ...

How do you create a drop down menu in VBA

example a menu with the following options

Black
Red
Green


--
cedtech23
------------------------------------------------------------------------
cedtech23's Profile:
http://www.excelforum.com/member.php...o&userid=31022
View this thread: http://www.excelforum.com/showthread...hreadid=506963



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Drop Down choice needs to lead to another drop down menu Hudson Excel Discussion (Misc queries) 1 January 9th 09 12:36 AM
Drop dwn menu. Formula to count selection frm menu in anoth cell? ggoldber Excel Worksheet Functions 1 June 4th 08 02:21 PM
Drop down menu whatzzup Excel Discussion (Misc queries) 1 October 28th 07 08:19 PM
filter dropdown menu so 2nd drop menu is customized menugal Excel Worksheet Functions 1 September 4th 07 05:25 PM
Cross-referenced drop-down menu (nested drop-downs?) creativeops Excel Worksheet Functions 4 November 22nd 05 05:41 PM


All times are GMT +1. The time now is 03:29 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"