Wrox Programmer Forums
|
BOOK: Excel 2000/2002 VBA Programmer's Reference
This is the forum to discuss the Wrox book Excel 2000 VBA: Programmers Reference by John Green, Stephen Bullen, Felipe Martins, Brian Johnson; ISBN: 9780764544019
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Excel 2000/2002 VBA Programmer's Reference 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 December 5th, 2005, 12:34 PM
Registered User
 
Join Date: Dec 2005
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Excel 2000 VBA - Dropdowns

I'm trying to add a drop down box with the following piece of code which is virtually the same as the code on page 178.

I keep getting the error message

"Unable to get the Add property of the dropdowns class"

I am using MS Excel 2003, is the coding different for later versions of Excel ?? Or am I missing a reference that needs adding in.

Many thanks for any help given.

Sub Add_Cost_Drop_Down(Target As Range)

    Dim ddBox As DropDown
    Dim i As Integer

    With Target
                    Set ddBox = Worksheets("QS Adjustments").DropDowns.Add(.Left, .Top, .Width, .Height)
    End With

    With ddBox
                    .OnAction = "Choose_Cost_Drop_Down"

                    For i = LBound(CCentres) To UBound(CCentres)
                                .AddItem CCentres(i)
                    Next i
    End With

End Sub







Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2000 Create PDF with VBA [email protected] Excel VBA 8 March 5th, 2008 03:36 PM
Excel 2000 VBA Problems drsammyb Excel VBA 0 January 17th, 2005 11:41 AM
VBA for Excel 2000...HELP! lhardesty Excel VBA 2 August 20th, 2004 09:08 AM





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