maaf, koreksi sedikit pada bagian Loop : For i - Next i, sebarusnya seperti ini
For i = LBound(UniqList) To UBound(UniqList) t = t & UniqList(i) & "," Next i FmlTxt = Left(t, Len(t) - 1) Pembuangan KOMA terkanan pada variable t dilakukan setelah loop selesai !! gitu loch... 2012/6/25 Rara Wilis <[email protected]> > *priiiittttt... pak guru kena tilang: fie kegedean he he he, untung pak > polisinya sedang shalat... * > > lihat lampiran; lihat prosedur di module 2 > > Sub CreateDropDownUniqList() > ' Rara / 25 Jun 2012 > '------------------- > Dim MasterPensiun As Range, FmlTxt As String > Dim i As Long, t As String, UniqList > Set MasterPensiun = Sheets("MASTER").Range("L12") > Set MasterPensiun = Range(MasterPensiun, MasterPensiun.End(xlDown)) > UniqList = LOUV(MasterPensiun) > *For i = LBound(UniqList) To UBound(UniqList)* > *t = t & UniqList(i) & ","* > *FmlTxt = Left(t, Len(t) - 1)* > *Next* > With Sheets("PAKAI-FORMULA").Range("B5").Validation > .Delete > .Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, _ > Operator:=xlBetween, Formula1:=FmlTxt > .IgnoreBlank = True: .InCellDropdown = True > .InputTitle = "": .ErrorTitle = "" > .InputMessage = "": .ErrorMessage = "" > .ShowInput = True: .ShowError = True > End With > End Sub >

