<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: VBA - On Click Event in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/deleted/m-p/85992#M2202</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like you are wanting to do cascading events where one event triggers the next and so on...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I do this in (Note: I am mainly a VB.Net programmer, a lot of differences between VB and VBA) the template/guideline/strategy I uses is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;'Say I have 1 combo and 2 other sequentially dependent combo's or other types of controls
Private Sub MyForm_Initialize()
ComboBox1.Clear
ComboBox1.List = funtionToPopulateComboBox1()
ComboBox2.Clear
ComboBox3.Clear
End Sub


Private Sub ComboBox1_Change() 'Combobox Change event or Updated event&amp;nbsp;&amp;nbsp; 
If ComboBox1.Value = "" Then Exit Sub&amp;nbsp; 'In case value was deleted/not necessary with a listbox
ComboBox2.Clear
ComboBox3.Clear
Dim selectedComboVal1 As String
selectedComboVal1 = ComboBox1.Value
Select Case selectedComboVal1
&amp;nbsp;&amp;nbsp; Case "Condition1"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conditionFilter = "ConditionArg1" 
&amp;nbsp;&amp;nbsp; Case "Condition2"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conditionFilter = "ConditionArg2"
&amp;nbsp;&amp;nbsp; ...
&amp;nbsp;&amp;nbsp; Case else
SubToPopulateComboBox ConditionFilter,comboBox2
end select&amp;nbsp;&amp;nbsp; 
End Sub


Private Sub ComboBox2_Change() 'Combobox Change event or Updated event&amp;nbsp;&amp;nbsp; 
If ComboBox2.Value = "" Then Exit Sub
ComboBox3.Clear
Dim selectedComboVal1 As String
selectedComboVal2 = ComboBox2.Value
Select Case selectedComboVal2
&amp;nbsp; Case "Condition1"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conditionFilter = "ConditionArg1" 
&amp;nbsp;&amp;nbsp; Case "Condition2"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conditionFilter = "ConditionArg2"
&amp;nbsp;&amp;nbsp; ...
&amp;nbsp;&amp;nbsp; Case else
end select 
SubToPopulateComboBox ConditionFilter, comboBox3&amp;nbsp; 
End Sub


Sub SubToPopulateComboBox(filter,cbo as ComboBox)
&amp;nbsp;&amp;nbsp; Select Case&amp;nbsp; cbo.Name
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "ComboBox2"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; functionToPopulateCBO2(filter) 'filter is based on the previous ComboBox selection
&amp;nbsp;&amp;nbsp; Case "ComboBox3"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; functionToPopulateCBO3(filter) 
&amp;nbsp; End Select
End sub&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 23:18:00 GMT</pubDate>
    <dc:creator>TedKowal</dc:creator>
    <dc:date>2021-12-10T23:18:00Z</dc:date>
    <item>
      <title>Deleted</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/deleted/m-p/85991#M2201</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;deleted&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Apr 2016 08:32:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/deleted/m-p/85991#M2201</guid>
      <dc:creator>JanPohle</dc:creator>
      <dc:date>2016-04-01T08:32:09Z</dc:date>
    </item>
    <item>
      <title>Re: VBA - On Click Event</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/deleted/m-p/85992#M2202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sounds like you are wanting to do cascading events where one event triggers the next and so on...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I do this in (Note: I am mainly a VB.Net programmer, a lot of differences between VB and VBA) the template/guideline/strategy I uses is this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;'Say I have 1 combo and 2 other sequentially dependent combo's or other types of controls
Private Sub MyForm_Initialize()
ComboBox1.Clear
ComboBox1.List = funtionToPopulateComboBox1()
ComboBox2.Clear
ComboBox3.Clear
End Sub


Private Sub ComboBox1_Change() 'Combobox Change event or Updated event&amp;nbsp;&amp;nbsp; 
If ComboBox1.Value = "" Then Exit Sub&amp;nbsp; 'In case value was deleted/not necessary with a listbox
ComboBox2.Clear
ComboBox3.Clear
Dim selectedComboVal1 As String
selectedComboVal1 = ComboBox1.Value
Select Case selectedComboVal1
&amp;nbsp;&amp;nbsp; Case "Condition1"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conditionFilter = "ConditionArg1" 
&amp;nbsp;&amp;nbsp; Case "Condition2"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conditionFilter = "ConditionArg2"
&amp;nbsp;&amp;nbsp; ...
&amp;nbsp;&amp;nbsp; Case else
SubToPopulateComboBox ConditionFilter,comboBox2
end select&amp;nbsp;&amp;nbsp; 
End Sub


Private Sub ComboBox2_Change() 'Combobox Change event or Updated event&amp;nbsp;&amp;nbsp; 
If ComboBox2.Value = "" Then Exit Sub
ComboBox3.Clear
Dim selectedComboVal1 As String
selectedComboVal2 = ComboBox2.Value
Select Case selectedComboVal2
&amp;nbsp; Case "Condition1"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conditionFilter = "ConditionArg1" 
&amp;nbsp;&amp;nbsp; Case "Condition2"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; conditionFilter = "ConditionArg2"
&amp;nbsp;&amp;nbsp; ...
&amp;nbsp;&amp;nbsp; Case else
end select 
SubToPopulateComboBox ConditionFilter, comboBox3&amp;nbsp; 
End Sub


Sub SubToPopulateComboBox(filter,cbo as ComboBox)
&amp;nbsp;&amp;nbsp; Select Case&amp;nbsp; cbo.Name
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Case "ComboBox2"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; functionToPopulateCBO2(filter) 'filter is based on the previous ComboBox selection
&amp;nbsp;&amp;nbsp; Case "ComboBox3"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; functionToPopulateCBO3(filter) 
&amp;nbsp; End Select
End sub&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:18:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/deleted/m-p/85992#M2202</guid>
      <dc:creator>TedKowal</dc:creator>
      <dc:date>2021-12-10T23:18:00Z</dc:date>
    </item>
  </channel>
</rss>

