Solved

Excel VBA user not able to write in a ComboBox

Posted on 2012-03-17
2
173 Views
Last Modified: 2012-03-18
Hi. I am using the following code to add a DropDown to a spreadsheet
I need the user to be able to also type text  in the control like a ComboBox.
Is this possible? If so, how would I alter the code to do that

Sub DD()

With ActiveSheet.DropDowns.Add(142.5, 38.25, 108.75, 24)
    .Top = Range("C1").Top
    .Left = Range("C1").Left
    .Height = Range("C1").Height
    .Width = Range("C1").Width
End With


End Sub
0
Comment
Question by:murbro
2 Comments
 
LVL 33

Accepted Solution

by:
Norie earned 500 total points
ID: 37733361
I'm afraid it's not possible to type text in a dropdown control.

You could try an ActiveX control.
    ActiveSheet.OLEObjects.Add ClassType:="Forms.ComboBox.1", Link:=False, _
        DisplayAsIcon:=False, Left:=Range("C1").Left, Top:=Range("C1").Top, Width:=Range("C1").Width, Height:= _
        Range("C1").Height

Open in new window

0
 

Author Closing Comment

by:murbro
ID: 37735215
Thanks very much
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Approximate matching with VLOOKUP and MATCH seems to me to be a greatly under-used technique, and one which is vital for getting good performance out of large lookups. Until recently I would always have advised using an exact match for simplicity an…
How to quickly and accurately populate Word documents with Excel data, charts and images (including Automated Bookmark generation) David Miller (dlmille) Synopsis In this article you’ll learn how to use ExcelToWord! to copy data,charts, shapes …
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

929 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