Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Setting dropdown menu to default value

I am using a series of dropdown menus in a userform.

Is there a way to set the value of a dropdown menu to a default.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,173
Default Setting dropdown menu to default value

How about setting the value when you initialise it to one of the options.
The code below uses the userform_initialize event which adds 10 items
(testx) to the combobox and then shows the form with Test6 selected

Private Sub UserForm_Initialize()
Dim x As Integer
For x = 1 To 10
ComboBox1.AddItem ("Test" & x)
Next x
ComboBox1.Value = "Test6"
End Sub

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England

HIS
www.nickhodge.co.uk

wrote in message
oups.com...
I am using a series of dropdown menus in a userform.

Is there a way to set the value of a dropdown menu to a default.



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
select From dropdown and return another dropdown menu RE4379 Excel Discussion (Misc queries) 2 March 11th 10 03:09 PM
filter dropdown menu so 2nd drop menu is customized menugal Excel Worksheet Functions 1 September 4th 07 05:25 PM
Setting default value in vba created FormTool Dropdown joeeng Excel Programming 2 October 11th 06 01:53 PM
Create Dropdown menu without using the Validation on the Data Menu lostinformulas Excel Worksheet Functions 0 July 13th 06 08:47 PM
Setting default pivot table field setting to "sum" Mr. Moose Excel Discussion (Misc queries) 2 December 21st 04 04:43 PM


All times are GMT +1. The time now is 08:52 AM.

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"