PDA

View Full Version : Solved: Please help me in this VBA Code to edit



Esmatullah
12-19-2012, 10:03 PM
Hi dear Friends! :help
I need to edit this macro that apply in a range like (B10:B2008) not in active cell :banghead: please help me dear friends.

Public Sub CreateList()
With ActiveCell
.Validation.Delete
.Validation.Add xlValidateList, , , "=" & "A1:A26"
End With
End Sub

patel
12-20-2012, 12:21 AM
Sub CreateList()
With Range("B1:B2008").Validation
.Delete
.Add Type:=xlValidateList, Formula1:="=$A$1:$A$26"
End With
End Sub

Esmatullah
12-21-2012, 06:18 AM
Thanks Dear Patel!
You Solved my Problem. Please in the forum too kindly :
http://www.vbaexpress.com/forum/showthread.php?p=282823#post282823