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 Form Help

Hi,

I have this code thus far, which Ive copied pretty much.

-----------------

Option Explicit
Private Const Sourcename As String = "SubsTargets"
Private Source As Range



Private Sub cmdClose_Click()
Unload Me
End Sub

Private Sub Label2_Click()

End Sub

Private Sub Titles_Click()

End Sub

Private Sub UserForm_Click()

End Sub

Private Sub UserForm_Initialize()
Set Source = Range(Sourcename)
LoadMarkets
End Sub
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
Editors.AddItem market
End If
Next


End Sub
Private Sub Editors_Change()
LoadMarketData
LoadTitlesData
End Sub
Private Sub LoadMarketData()
Dim market As String
Dim index As Long
Dim titleselection As String

market = Editors.Value
titleselection = TitleSelect.Value
With Titles
.Clear
For index = 2 To Source.Rows.Count
If Source.Cells(index, 1).Value = market Then
.AddItem Source.Cells(index, 2)
.List(.ListCount - 1, 1) = Source.Cells(index, 3)
.List(.ListCount - 1, 2) = Source.Cells(index, 4)

End If
Next
End With

End Sub
Private Sub LoadTitlesData()
Dim market As String
Dim index As Long

market = Editors.Value
With TitleSelect
.Clear
For index = 2 To Source.Rows.Count
If Source.Cells(index, 1).Value = market Then
.AddItem Source.Cells(index, 3)
End If
Next
End With

End Sub

------------------------

My first drop down being the Editors.
The second down being Load TitlesData.
The listbox being loadmarketdata.

How do I alter the code in the loadmarketdata routine so that it depends on
both the Editor selection (already done) but then on the title select???

TIA

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
How do I fill a cell in a user form from a selection on same form? Terry Tipsy Excel Discussion (Misc queries) 4 June 11th 07 02:59 PM
User Form Steve[_71_] Excel Programming 3 April 20th 05 04:41 PM
How to: User Form to assign a user defined range to a macro variab TrevTrav Excel Programming 1 March 22nd 05 07:57 PM
I am looking to see if anybody has an equivalant user form to Outlooks CONTACT form BruceJ[_2_] Excel Programming 2 October 15th 03 05:28 PM


All times are GMT +1. The time now is 09: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"