Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi,
Following your advice, I am trying this code, in order to show item listed in combobox only once each item. (like autofilter), but i doesn't work, (it gives mi error: Variable not defined and remarkin "Scripting") Private Sub UserForm_Initialize() 'Set a reference to MS Scripting runtime Set Dic = CreateObject(Scripting.Dictionary) Dim Dic As New Scripting.Dictionary Dim rSource As Range, cell As Range Dim sVal As String Dim MyList As String 'Point to specific column MyList = "P3:P20" Set rSource = Range("MyList") With ChapExpCB For Each cell In rSource.Cells sVal = cell.Value If Not Dic.Exists(sVal) Then Dic.Add sVal, sVal .AddItem sVal End If Next End With Set Dic = Nothing End Sub Thanks in advance -- Message posted from http://www.ExcelForum.com |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Div/0 error on running mean % | Excel Discussion (Misc queries) | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Worksheet Functions | |||
I tried to get around the problem of the pivot table field settingdefaulting to Count instead of Sum by running a macro of change the settingfrom Count to Sum. However, when I tried to run the Macro, I got error messageof run time error 1004, unable | Excel Discussion (Misc queries) | |||
VBA question - Set reference to run Scripting.Dictionary | Excel Programming | |||
Running from web error | Excel Programming |