<?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 ComboBox Populated with multiple classes in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-combobox-populated-with-multiple-classes/m-p/5930687#M114086</link>
    <description>Any advice on this one pls?</description>
    <pubDate>Tue, 01 Dec 2015 09:53:34 GMT</pubDate>
    <dc:creator>Jacques.Grobler</dc:creator>
    <dc:date>2015-12-01T09:53:34Z</dc:date>
    <item>
      <title>VBA ComboBox Populated with multiple classes</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-combobox-populated-with-multiple-classes/m-p/5926730#M114085</link>
      <description>&lt;P&gt;Hi everyone&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is not really an Autodesk question, but it is something I'd like to integrate into Inventor so I am going to ask it anyway...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to create, on a userform, 2 comboboxes for steel sections.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Box 1 will be used to select between FB, Angles, Channels etc. And then box 2 will be the different available sizes for what ever sections is selected.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Box 1 list is populated using .AddItem method and Box 2 is populated using a class list.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Getting to switch between classes for Box 2 is fairly simple, and I am able to retrieve the correct values from my classes for each connected class.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However the problem comes in after I have done 2 or 3 selections, all of a sudden the returned values no longer update.&lt;/P&gt;&lt;P&gt;I have gone through my code and I cannot see where the problem occurs.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Below is my code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;Option Explicit

Dim WithEvents objFB As cls_Section_FB
Dim WithEvents objL As cls_Section_L
Dim WithEvents objC As cls_Section_C

Private Sub UserForm_Initialize()

    With cmb_Sections
        .AddItem "FB"
        .AddItem "C"
        .AddItem "L"
    End With

End Sub

Private Sub cmb_Sections_Change()

    cmbFlange.Clear

    If cmb_Sections = "FB" Then
        Set objFB = New cls_Section_FB
        Set objFB.ListControl = Me.cmbFlange
        Set objFB.m_cmb_Section = Me.cmbFlange
    ElseIf cmb_Sections = "L" Then
        Set objL = New cls_Section_L
        Set objL.ListControl = Me.cmbFlange
        Set objL.m_cmb_Section = Me.cmbFlange
    ElseIf cmb_Sections = "C" Then
        Set objC = New cls_Section_C
        Set objC.ListControl = Me.cmbFlange
        Set objC.m_cmb_Section = Me.cmbFlange
    End If

End Sub

Private Sub objL_SectionCalc()

    With objL
         lblHeight = .section_Height
         lblR1 = .section_R1
         lblR2 = .section_R2
         lblTF = .section_TFlange
         lblTW = .section_TWeb
         lblWidth = .section_Width
         lblName = .section_Name
    End With

End Sub

Private Sub objFB_SectionCalc()

    With objFB
        lblHeight = .section_Height
        lblWidth = .section_Width
        lblName = .section_Name
        lblR1 = 0
        lblR2 = 0
        lblTF = 0
        lblTW = 0
    End With

End Sub

Private Sub objC_SectionCalc()

    With objC
         lblHeight = .section_Height
         lblR1 = .section_R1
         lblR2 = .section_R2
         lblTF = .section_TFlange
         lblTW = .section_TWeb
         lblWidth = .section_Width
         lblName = .section_Name
    End With

End Sub&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Fri, 27 Nov 2015 05:52:01 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-combobox-populated-with-multiple-classes/m-p/5926730#M114085</guid>
      <dc:creator>Jacques.Grobler</dc:creator>
      <dc:date>2015-11-27T05:52:01Z</dc:date>
    </item>
    <item>
      <title>Re: VBA ComboBox Populated with multiple classes</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-combobox-populated-with-multiple-classes/m-p/5930687#M114086</link>
      <description>Any advice on this one pls?</description>
      <pubDate>Tue, 01 Dec 2015 09:53:34 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-combobox-populated-with-multiple-classes/m-p/5930687#M114086</guid>
      <dc:creator>Jacques.Grobler</dc:creator>
      <dc:date>2015-12-01T09:53:34Z</dc:date>
    </item>
    <item>
      <title>Re: VBA ComboBox Populated with multiple classes</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/vba-combobox-populated-with-multiple-classes/m-p/5932568#M114087</link>
      <description>Help pls</description>
      <pubDate>Wed, 02 Dec 2015 13:05:37 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/vba-combobox-populated-with-multiple-classes/m-p/5932568#M114087</guid>
      <dc:creator>Jacques.Grobler</dc:creator>
      <dc:date>2015-12-02T13:05:37Z</dc:date>
    </item>
  </channel>
</rss>

