simple question

Posted on 2004-11-26
Last Modified: 2012-08-14
this must be some basic mistake i am doin but i am new to VB..

i have a combo box 'name'  on my form.
i also have a options 'checkbox' control array.


i am seeting name.locked =true when the form loads.

when user a(0) options box is clicked i want the combobox to be unlocked
so i wrote

Private Sub a_Click(Index As Integer)
If a(0).Value = True Then name.Locked = False
End Sub

but this is givinfg me a syntax error

use of invalid quantifier for the use of name in name.locked

what am i doing wrong here?

how to disable A COMBO BOX and enable it programmatically?


Question by:Vlearns
    1 Comment
    LVL 32

    Accepted Solution

    I believe "name" is a reserved word in VB, try renaming the control to cboName instead.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    Suggested Solutions

    Introduction While answering a recent question about filtering a custom class collection, I realized that this could be accomplished with very little code by using the ScriptControl (SC) library.  This article will introduce you to the SC library a…
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

    755 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now