Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 385
Default Another Error Message

Hey GUYS,
Patrick gave me this the other night. Works great in the workbook he suplied
until i copy it and put it into mine. This part looks in column f finds the
the differant markets and fills the combo box in the form. The como box then
fills the list box with four differant columns. Take a look at this area
********** the error message reads compile error, user defined type not
defined. Any suggestions. Maybe other way to write it? THank you.
Private Sub LoadMarkets()
Dim markets As New Scripting.Dictionary **************
For index = 2 To source.Rows.Count
market = source.Cells(index, "F").Value
If Not markets.Exists(market) Then
markets.Add market, market
cmbMarket.AddItem market
End If
Next
End Sub
--
Though daily learning, I LOVE EXCEL!
Jennifer
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,339
Default Another Error Message

Hi,
In VBE:

Tools--References .. select Microsoft Scripting Runtime from "Available
References". It should now work OK.

HTH

"Jennifer" wrote:

Hey GUYS,
Patrick gave me this the other night. Works great in the workbook he suplied
until i copy it and put it into mine. This part looks in column f finds the
the differant markets and fills the combo box in the form. The como box then
fills the list box with four differant columns. Take a look at this area
********** the error message reads compile error, user defined type not
defined. Any suggestions. Maybe other way to write it? THank you.
Private Sub LoadMarkets()
Dim markets As New Scripting.Dictionary **************
For index = 2 To source.Rows.Count
market = source.Cells(index, "F").Value
If Not markets.Exists(market) Then
markets.Add market, market
cmbMarket.AddItem market
End If
Next
End Sub
--
Though daily learning, I LOVE EXCEL!
Jennifer

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default Another Error Message

or make your snippet latebound
(a bit slower but if item count is not high s/b ok.

dim markets as object
set markets = Createobject("scripting.dictionary")





--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


Toppers wrote :

Hi,
In VBE:

Tools--References .. select Microsoft Scripting Runtime from
"Available References". It should now work OK.

HTH

"Jennifer" wrote:

Hey GUYS,
Patrick gave me this the other night. Works great in the workbook
he suplied until i copy it and put it into mine. This part looks in
column f finds the the differant markets and fills the combo box in
the form. The como box then fills the list box with four differant
columns. Take a look at this area ********** the error message
reads compile error, user defined type not defined. Any
suggestions. Maybe other way to write it? THank you. Private Sub
LoadMarkets() Dim markets As New Scripting.Dictionary
************** For index = 2 To source.Rows.Count
market = source.Cells(index, "F").Value
If Not markets.Exists(market) Then
markets.Add market, market
cmbMarket.AddItem market
End If
Next
End Sub
--
Though daily learning, I LOVE EXCEL!
Jennifer

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 385
Default Another Error Message

You guys are awesome! Hey Topper what does scripting runtime mean and what
are all those available references. How do i learn to use them? Thanks once
again.
--
Though daily learning, I LOVE EXCEL!
Jennifer


"Toppers" wrote:

Hi,
In VBE:

Tools--References .. select Microsoft Scripting Runtime from "Available
References". It should now work OK.

HTH

"Jennifer" wrote:

Hey GUYS,
Patrick gave me this the other night. Works great in the workbook he suplied
until i copy it and put it into mine. This part looks in column f finds the
the differant markets and fills the combo box in the form. The como box then
fills the list box with four differant columns. Take a look at this area
********** the error message reads compile error, user defined type not
defined. Any suggestions. Maybe other way to write it? THank you.
Private Sub LoadMarkets()
Dim markets As New Scripting.Dictionary **************
For index = 2 To source.Rows.Count
market = source.Cells(index, "F").Value
If Not markets.Exists(market) Then
markets.Add market, market
cmbMarket.AddItem market
End If
Next
End Sub
--
Though daily learning, I LOVE EXCEL!
Jennifer

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Error Message Jeff Excel Discussion (Misc queries) 2 March 7th 08 04:33 PM
VBA Error Message "Compile Error...." Steve Excel Discussion (Misc queries) 3 July 15th 05 09:20 AM
Excel XP error message Run Time Error 91 Lenny[_3_] Excel Programming 1 March 3rd 05 10:15 PM
changing the message in an error message The Villages DA Excel Worksheet Functions 2 February 18th 05 05:30 PM
How do I get rid of "Compile error in hidden module" error message David Excel Discussion (Misc queries) 4 January 21st 05 11:39 PM


All times are GMT +1. The time now is 12:50 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"