I need to add 5 items (Manhattan, Queens, SI, Brooklyn, Bronx) to a combo box
when the form loads. How to do this? It should be simple, but .....
--
TS 6 2908
TS wrote: I need to add 5 items (Manhattan, Queens, SI, Brooklyn, Bronx) to a combo box when the form loads. How to do this? It should be simple, but .....
Public Sub Form_Load(...) Handles Form.Load
Combobox.Items.Add(...)
End Sub
This is the problem, I tried
combobox1.Items.Add("Manhattan", "Queens", "SI", "....", "....") and it
didn't work. Please help!!
--
TS
"I Don't Like Spam" wrote: TS wrote: I need to add 5 items (Manhattan, Queens, SI, Brooklyn, Bronx) to a combo box when the form loads. How to do this? It should be simple, but .....
Public Sub Form_Load(...) Handles Form.Load Combobox.Items.Add(...) End Sub
TS wrote: This is the problem, I tried combobox1.Items.Add("Manhattan", "Queens", "SI", "....", "....") and it didn't work. Please help!!
combobox1.Items.Add("Manhattan")
combobox1.Items.Add("Queens")
combobox1.Items.Add("...")
"TS" <TS@discussions.microsoft.com> schrieb: I need to add 5 items (Manhattan, Queens, SI, Brooklyn, Bronx) to a combo box when the form loads. How to do this? It should be simple, but .....
\\\
Me.ComboBox1.Items.AddRange( _
New String() { _
"Manhattan", "Queens", "SI" _
} _
)
///
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Or something like this
Dim sArray() as String ={"Manhattan","Queens", "SI", "Brooklyn", "Bronx"}
ComboBox1.Items.AddRange(sArray)
Meelis
"TS" <TS@discussions.microsoft.com> wrote in message
news:EE**********************************@microsof t.com... I need to add 5 items (Manhattan, Queens, SI, Brooklyn, Bronx) to a combo box when the form loads. How to do this? It should be simple, but ..... -- TS
TS,
If you want to do these things, than use the designer and look in the
designer part how it is done.
Mostly that is done very good accoording to controls.
I thought that you will see in this case than the solution that Herfried
shows you.
(Before somebody thinks it, I am sure that he did not do that for this
answer).
I hope this helps,
Cor This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: 6thirty |
last post by:
Hi,
I've created a stocktaking database using Access XP. This is indexed by two
fields - part number and shelf location.
I am currently inputting all the data via a form. When I have entered a...
|
by: Gav |
last post by:
I am using VS 2005 and am trying to add items to a combo box using C#. I
know how to add simple text items but I am trying to add a value and some
text ie.
Value Text
A First Text
B ...
|
by: vb |
last post by:
Hi,
I am new to .Net.
I am using a Combo Box in my windows forms. I am adding the items by
creating the instances and adding the same to the list.
My questions/doubts are:
1. If I have 25 to...
|
by: Juan Pedro Gonzalez |
last post by:
I wanted to add a Combobox to a toolbar... Kind of the look you get on
VisualStudio's toolbar.
I've been able to find some VB 6 samples, but the placeholder option is no
longer available for...
|
by: Gian Paolo |
last post by:
hi all
i'm looking for a way to add 2 items in a combobox in the same line and
hide one.
i'm working on the code above but it returns me only the last value i
entered and i do not know why....
...
|
by: stinehelferw |
last post by:
I need a right-click menu on a form list control with combobox
controls.
I used View->Toolbars->Customize to create a toolbar.
I added ComboBox through commands tab.
I set properties to Popup...
|
by: mollyf |
last post by:
I've got a combo box that I want to bind a collection to. I got the
error "Complex Data Binding accepts as a data source either an IList or
an IListSource" so I tried using the BindingSource,...
|
by: The Eclectic Electric |
last post by:
I'd be very grateful if anyone could help me with this. From my limited
knowledge of Javascript I don't think it is possible, but I'll punt anyway.
I downloaded and very slightly adapted this...
|
by: imwhiteandnerdy |
last post by:
i'm hoping I can get some help with adding my combo box selection to my access database.Any Help would be appreciated.
I've been told I need complex binding Basically I just want to add the...
|
by: =?Utf-8?B?Y2RtdW5veg==?= |
last post by:
I have created a sub routine to programmatically add an indefinite number of
combo boxes to a form. The combo boxes are bound in code to a view for
displaying the available options. This routine...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |