Wrox Programmer Forums
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old September 11th, 2007, 01:22 AM
Registered User
Join Date: Sep 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Filling a combobox/listbox

1) I am using VBScript to fill a combobox with current mth and previous mth in mmm-yy format. i.e. the combobox should contain "Sept-07" and "Aug-07".
<script language="VBScript">
sub abc()
' f1.D1.options(0).value = "a"
' f1.D1.additem "a"
end sub
<body onload=abc()>
<form name= "f1" method="Post" action="">
    <p><select size="1" name="D1"></select></p>

2) I have a 2 listbox's 1st with say list of 10 items and the 2nd one is empty. I select multiple options in the 1st box and click on a button, the selected items from the 1st box should move to the 2nd box.

Old September 21st, 2007, 12:08 PM
Friend of Wrox
Join Date: Nov 2004
Posts: 1,621
Thanks: 1
Thanked 3 Times in 3 Posts

The only way I have been able to do something like this is to re-write the select's outerHTML. Perhaps there is now an easier way though.

Similar Threads
Thread Thread Starter Forum Replies Last Post
filling the combobox using sql data adapter kumaran BOOK: Professional .NET 2.0 Generics 4 October 5th, 2015 07:57 AM
Filling ComboBox from Dataset dcathers C# 9 June 15th, 2013 03:31 AM
Filling comboBox from an XML File kuznickic C# 2005 11 August 29th, 2007 01:54 AM
Filling SubForm from ComboBox ayazhoda Access VBA 4 June 5th, 2007 10:56 AM
Filling Combobox with value from other Combobox ayazhoda Access VBA 6 June 5th, 2007 04:58 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.