Solved

Excel VBA user not able to write in a ComboBox

Posted on 2012-03-17
2
172 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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
This article will guide you to convert a grid from a picture into Excel format using Microsoft OneNote and no other 3rd party application.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

757 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

18 Experts available now in Live!

Get 1:1 Help Now