Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
|
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA 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 March 18th, 2006, 08:36 AM
Authorized User
 
Join Date: Jun 2004
Posts: 13
Thanks: 0
Thanked 0 Times in 0 Posts
Default .Shapes.AddFormControl(xlListBox

I have created a List box using the following macro. But I'm clueless as to how to extract the selected value from the list:

Set lb = Worksheets("Sheet1").Shapes.AddFormControl(xlListB ox, 1, 1, 100, 100)

lb.Name = "ListBox1"

Do While Not rs.EOF
    lb.ControlFormat.AddItem rs.fields(0).Value
    rs.movenext
Loop

I would appreciate any help.

Thanks






Similar Threads
Thread Thread Starter Forum Replies Last Post
drag and drop shapes michaelcy Java GUI 0 March 16th, 2007 09:27 AM
Drawing Shapes cbulutlar Javascript 2 March 6th, 2006 02:25 PM
drawing shapes (advanced) FFinn Javascript How-To 1 September 28th, 2005 10:19 AM
Dragging shapes rajanikrishna Pro VB 6 0 October 19th, 2004 08:35 PM
saving images and shapes together saiyedriyaz BOOK: Beginning Java 2 1 June 12th, 2004 08:23 AM





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