473,795 Members | 2,834 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

How can I add items to combo box without using ";" in additem method

Hello

I have one problem in vba. I have combo box, which has for example 3 columns.
Then I want to add items to suitable columns without using ";"
separator.

cmb_name.addite m "string1" + ";" + "string2" + ";" + "string3"

becaase string1, string2, string3 can contain ";" mark as well

please give me any solution, which solves this problem.
thanks
Nov 13 '05 #1
3 2817
Private Sub Form_Load()
cbxMyList.RowSo urceType = "Value List"
cbxMyList.RowSo urce = Chr(34) & "3;C" & Chr(34) & ";" & Chr(34) & "4;F"
& Chr(34)
End Sub

created the following dropdown:
3;C
4;F

Does this solve your problem?

James A. Fortune

Nov 13 '05 #2
In news:51******** *************** ***@posting.goo gle.com,
Jareckipw typed:
Hello

I have one problem in vba. I have combo box, which has for
example 3 columns. Then I want to add items to suitable
columns without using ";"
separator.

cmb_name.addite m "string1" + ";" + "string2" + ";" +
"string3"

becaase string1, string2, string3 can contain ";" mark as
well

please give me any solution, which solves this problem.
thanks

My first thought is to use a table which you clear then fill
with the rows you want in code. Then just use a Select in
the source for the combo. BUT, I can't remember if having a
; anywhere in the returned string will work. It still might
be worth trying...

--
Nick Coe (UK)
Available - Will work for money :-)
http://www.alphacos.co.uk/ AccHelp + pAnimal
http://www.pjandcoe.co.uk/ TShirts with Bark Factor!
Nov 13 '05 #3
ji********@comp umarc.com wrote in message news:<11******* **************@ o13g2000cwo.goo glegroups.com>. ..
Private Sub Form_Load()
cbxMyList.RowSo urceType = "Value List"
cbxMyList.RowSo urce = Chr(34) & "3;C" & Chr(34) & ";" & Chr(34) & "4;F"
& Chr(34)
End Sub

created the following dropdown:
3;C
4;F

Does this solve your problem?

James A. Fortune


Thanks for your reply. This code solves my problem. I'm grateful.
I try work out this issue but I use only additem.
You notice that this work only with rowsourcery , doesn't work with
additem.:) It is very strange.
But I'm glad that that code works.

Thx
Jarosław Kurek
Warsaw University of Technology.
Warsaw
Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
3016
by: Willem van Rumpt | last post by:
Hi all, coming from an unmanaged programming background, I took my time to sort out the IDisposable and finalizer patterns. Just when I thought I had it all conceptually neatly arranged, the "Close()" methods reared their ugly (at least it would seem...)heads. I was happily delving away in the .NET framework, investigating the stream classes with the msdn and Lutz Roeder's .NET reflector, when I stumbled upon the following:
14
3169
by: MuZZy | last post by:
Hi, Lately i've been (and still am) fixing some memory leaks problems in the project i just took over when i got this new job. Among the other issues i've noticed that for localy created objects it makes difference to explicitly put them to null after working with them is done - it somehow makes the GC collect them sooner, like here: void SomeFunc() { MyClass c = new MyClass();
5
2113
by: ad | last post by:
When I study the Portal Starter Kit (http://www.asp.net/Default.aspx?tabindex=8&tabid=47) There is a line in DesktopPortalBanner.ascx.cs PortalSettings portalSettings = (PortalSettings) HttpContext.Current.Items; Where to define HttpContext.Current.Items?
3
4522
by: Giovanni Bassi | last post by:
Hello All, I have a class implementing IList and a global object of this class type. I have two different form objects. One has a ListBox and the other has ComboBox. Both of their datasources are set to this global object. The problem is that when I select an item in the ListBox the combobox selecteditem changes to the same item selected in the ListBox. And the oposite is also true, so when I select an item in the ComboBox my ListBox...
2
2927
by: JohnB | last post by:
hi I am using System.Web.Mail.MailMessage to send email. Is there any way to keep the email to "Sent Items" Folder?? I use Microsoft Outlook as my email tool. Thanks
2
2812
by: hsuntn | last post by:
I am grabbing Outlook MailItems using the Items property on my Outlook inbox. When I iterate through them, I notice that they are not ordered in ReceivedTime or CreationTime order. For example, Items.ReceivedTime is April 2005 Items.ReceivedTime is May 2005 Items.ReceivedTime is October 2005 Items.ReceivedTime is June 2005 I did some experiments and the following seems to explain how
0
1469
by: VB Newbie | last post by:
I am creating a user control containing a combobox using VB.NET(2003) I want to add 2 public properties "DataSource" and "Items" like the "System.Windows.Forms.ComboBox" here is my code, but it doesn't work. What's wrong with it? Public Property cboDataSource() As Object Get Return Me.cbo.DataSource 'cbo is my combobox End Get
5
6905
by: VB Newbie | last post by:
I am creating a user control containing a combobox using VB.NET(2003) I want to add 2 public properties "DataSource" and "Items" like the "System.Windows.Forms.ComboBox" here is my code, but it doesn't work. What's wrong with it? Public Property cboDataSource() As Object Get Return Me.cbo.DataSource 'cbo is my combobox End Get
3
1410
by: Navdip | last post by:
i want to create a DHTML page in which i want to create a Table using method in JSCRIPT in which i'll pass the number of rows and coloumns as arguments of method. and table should get created when i call the method please give me code if u can.....
0
9673
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9522
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10216
jinu1996
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9044
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7543
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6783
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5437
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5565
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2921
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.