Click here to Skip to main content
13,449,326 members (44,613 online)
Rate this:
Please Sign up or sign in to vote.
See more:
Help me pls
How can I declare Combobox1...because it shows an error that: "Combobox1 is not declared.."

how can I declare it?

that's the code:

Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load

        ComoBox1.SelectedItem = 0

End Sub
Posted 17-Jan-13 10:17am
Rate this: bad
Please Sign up or sign in to vote.

Solution 2

Dim ComboBox1 as new ComboBox().

Also, your last line of code in your thread is spelled wrong.
San Dra 17-Jan-13 16:40pm
combobox.SelectedItem = 0

It was because I typed faster on keyboard sorry about that.
richcb 17-Jan-13 16:42pm
No worries, I just wasn't sure if that was in your code too. Did my suggestion work for you?
Sergey Alexandrovich Kryukov 17-Jan-13 16:55pm
No, you need to copy everything from real code. Why feeding more of the garbage to this site? we have enough already. :-)
Espen Harlinn 17-Jan-13 16:50pm
Sergey Alexandrovich Kryukov 17-Jan-13 16:55pm
Sure, a 5.
Rate this: bad
Please Sign up or sign in to vote.

Solution 3

Add a combo box to your form and name it ComboBox1
Espen Harlinn 17-Jan-13 16:51pm
5'ed! Nice and simple :-D
San Dra 18-Jan-13 6:12am
Ok that's okey, but when i want to Display it: it shows the message: " generate combobox1.text..." and some other message that contain an error :/

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web02 | 2.8.180318.3 | Last Updated 17 Jan 2013
Copyright © CodeProject, 1999-2018
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100