PC Review


Reply
Thread Tools Rate Thread

capturing the values from a combo box into an xml file

 
 
DowningDevelopments
Guest
Posts: n/a
 
      15th Aug 2008
iv got a simple multi select combo box which takes the values from a range of
cells (its a concept design im trying to show that this works).

That part works, what i need to do is capture those values and then put them
into an xml file which we can ADO into a database.

im stuck on actually grabbing the values from the comboBox, how do i access
the array its storing them in, i can write a while look and go through it but
i dont know how to access the data.

any help?

Amit
 
Reply With Quote
 
 
 
 
james.billy@gmail.com
Guest
Posts: n/a
 
      15th Aug 2008
On Aug 15, 7:16*am, DowningDevelopments
<DowningDevelopme...@discussions.microsoft.com> wrote:
> iv got a simple multi select combo box which takes the values from a range of
> cells (its a concept design im trying to show that this works).
>
> That part works, what i need to do is capture those values and then put them
> into an xml file which we can ADO into a database.
>
> im stuck on actually grabbing the values from the comboBox, how do i access
> the array its storing them in, i can write a while look and go through itbut
> i dont know how to access the data.
>
> any help?
>
> Amit


I assume you mean Listbox rather than combo box (as far as I know you
can't have a multiselect combo box in vba)

Is the control on a form or a worksheet, if its on a form you would
use something like the following attached to a command button so once
the user has finished selecting you can add to the xml sheet:

For i = 0 To Me.ListBox1.ListCount - 1 ' listboxes are zero based
If Me.ListBox1.Selected(i) Then ' if the item is selected then
tmpStr = tmpStr & vbCr & Me.ListBox1.List(i, 0)
End If
Next i
MsgBox tmpStr

James
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Populate Combo Box with Values from CSV File Mark Microsoft Excel Programming 3 14th Nov 2008 03:42 AM
Capturing items from a Combo box =?Utf-8?B?Sko=?= Microsoft Access Forms 6 14th Sep 2007 09:33 PM
Combo box values from another Access File =?Utf-8?B?VG95Rml4ZXI=?= Microsoft Access Getting Started 4 24th Jul 2007 04:08 PM
Look up Values from other file based on combo box's option =?Utf-8?B?SmFj?= Microsoft Excel Misc 2 1st Jul 2007 12:59 PM
Capturing the text from a Combo Box Pat Microsoft Access Forms 4 26th Mar 2006 03:58 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:12 AM.