LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 46
Default User Forms

I have copied this VB from another answer to a similar problem I have. This
being part of it:-
------------------------------------
Private Sub LoadMarkets()
Dim markets As New Scripting.Dictionary
Dim index As Long
Dim market As String
For index = 2 To Source.Rows.Count
market = Source.Cells(index, 1)
If Not markets.Exists(market) Then
markets.Add market, market
cmbMarket.AddItem market
End If
Next


End Sub
--------------------------------

Obviously the spreadsheet works fine when I download it. But when I try to
recreate the code into a different workbook it doesnt work.

The problem being the second line of code. Dim markets As New.Scripting
Dictionary. Problem being 'Used-defined type not defined'.

Can someone please help me with this? Why it works in existing spreadsheet
but then why if copied to a new workbook no longer works?

Thanks
Matthew
 
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
user forms Obi-Wan Kenobi Excel Discussion (Misc queries) 0 March 21st 06 08:28 PM
User Forms Runner77 Excel Discussion (Misc queries) 1 January 12th 06 06:20 AM
User Forms ajocius[_41_] Excel Programming 2 November 20th 05 10:10 PM
User forms eklarsen[_4_] Excel Programming 2 May 6th 04 06:09 PM
User forms Candee[_2_] Excel Programming 2 September 12th 03 03:11 PM


All times are GMT +1. The time now is 06:15 PM.

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

About Us

"It's about Microsoft Excel"