ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   combo box (https://www.excelbanter.com/excel-programming/382071-combo-box.html)

Maga Circe

combo box
 
How can i add a combo box in every cell of a colum?
The column "A" is "Department" and i want to be sure that in the cell(x,1)
will be prompted a combo box with the possibile values (0001, 02b, 03hj,
04jk)



Doug Glancy[_7_]

combo box
 
Maga Circe,

Have you considered using Data Validation instead? Based on your
description it will do what you want much more easily. If you're
interested, look it up in Help.

hth,

Doug

"Maga Circe" wrote in message
...
How can i add a combo box in every cell of a colum?
The column "A" is "Department" and i want to be sure that in the
cell(x,1) will be prompted a combo box with the possibile values (0001,
02b, 03hj, 04jk)




Kari J Keinonen[_2_]

combo box
 
Hi!

Try this one, its only a recorder macro but ......

Sub ValidationList()
' first cell in column
Range("A4").Select
' area selection (first cell to last cell)
Range(Selection, Selection.End(xlDown)).Select
With Selection.Validation
.Delete
' add validate list all cells
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$D$4:$D$7"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
End Sub

Regards
Kari J Keinonen


All times are GMT +1. The time now is 05:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com