Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scripting.Dictionary
Can anyone help, I am getting this error. Thank you!
***Compile Error ***User Defined not type Defined Private Sub LoadMares() Dim mares As New Scripting.Dictionary ***(THIS IS HIGHLIGHTED) Dim index As Long Dim Mare As String For index = 2 To Source.Rows.Count Mare = Source.Cells(index, 1) If Not mares.Exists(Mare) Then mares.Add Mare, Mare cmbMare.AddItem Mare End If Next End Sub -- Though daily learning, I LOVE EXCEL! Jennifer |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scripting.Dictionary
Hi
You need to set a reference (in Tools) to the Microsoft Scripting Runtime library (which is not part of Excel VBA, hence the error) regards Paul Jennifer wrote: Can anyone help, I am getting this error. Thank you! ***Compile Error ***User Defined not type Defined Private Sub LoadMares() Dim mares As New Scripting.Dictionary ***(THIS IS HIGHLIGHTED) Dim index As Long Dim Mare As String For index = 2 To Source.Rows.Count Mare = Source.Cells(index, 1) If Not mares.Exists(Mare) Then mares.Add Mare, Mare cmbMare.AddItem Mare End If Next End Sub -- Though daily learning, I LOVE EXCEL! Jennifer |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Scripting.Dictionary
See response to earlier post in this group.
-- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Jennifer" wrote in message ... Can anyone help, I am getting this error. Thank you! ***Compile Error ***User Defined not type Defined Private Sub LoadMares() Dim mares As New Scripting.Dictionary ***(THIS IS HIGHLIGHTED) Dim index As Long Dim Mare As String For index = 2 To Source.Rows.Count Mare = Source.Cells(index, 1) If Not mares.Exists(Mare) Then mares.Add Mare, Mare cmbMare.AddItem Mare End If Next End Sub -- Though daily learning, I LOVE EXCEL! Jennifer |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Scripting Help | Excel Discussion (Misc queries) | |||
Scripting.Dictionary question | Excel Programming | |||
Is scripting the way to go here? | Excel Programming | |||
VBA - running scripting dictionary (error!) | Excel Programming | |||
VBA question - Set reference to run Scripting.Dictionary | Excel Programming |