Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default How to mark an item selected in the Excel VBA Form?

I made a combobox in a VBA form and I want the user to select only
items from the list but the problem is the default selected item it
shows blank and allows user to add his input into it.
Kindly suggest a solution .I think If I give a default selected value
then the problem will be solved , but how to give the default value?

Regards
Divya

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default How to mark an item selected in the Excel VBA Form?

Hi Divya,

try this with just a combobox on the form

Private Sub UserForm_Initialize()
ComboBox1.List = Array("first", "second", "third")
ComboBox1.ListIndex = 1 ' ie 1 is 2nd item
End Sub

See ListIndex in help

Regards,
Peter T

"divya" wrote in message
oups.com...
I made a combobox in a VBA form and I want the user to select only
items from the list but the problem is the default selected item it
shows blank and allows user to add his input into it.
Kindly suggest a solution .I think If I give a default selected value
then the problem will be solved , but how to give the default value?

Regards
Divya



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
chek mark in menu item Joe Jia Excel Programming 1 October 24th 06 08:35 PM
How do I put a check mark box in an excel document form? Albert Excel Discussion (Misc queries) 2 July 7th 06 05:14 PM
Menu Item check mark?? Derrick[_3_] Excel Programming 1 April 1st 05 06:36 PM
How do I tell Excel to take a selected item and copy it to anothe. HEATHERCOX Excel Worksheet Functions 0 February 28th 05 03:27 PM
How do I mark an item as paid so it is not included in a column t. BradLewBooks Excel Worksheet Functions 3 February 19th 05 10:22 PM


All times are GMT +1. The time now is 11:20 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"