Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50117

List box macro

$
0
0
hi,

I have a macro,

Code:

Sub Add_Drop_Down_Menu_Selection()
With Selection.Validation
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:=xlBetween, _
Formula1:="=$C$1:$C$39"
.IgnoreBlank = True
.InCellDropdown = True
End With
End Sub

It lists all the contents from C1 to C39 and it runs for a selected sheet.

I need to modify the macro so my list box is in Sheet 1 and the contents C1 to C39 is in Sheet 2.

Thanks

Viewing all articles
Browse latest Browse all 50117