Posts by percyconnelly

    Re: Userform Initialize vs Userform Show


    Hi everyone,
    New to these forums. However did have the same problem that the "userform_initialise()" sub did not seem to activate. Solved it as below, probably not supposed to paste code into this box.


    Regards John Connelly


    Sub WAGES_SHOW()
    '
    test = initialise()
    WagesCalculator.Show


    End Sub


    Function initialise()
    WagesCalculator.ComboBoxRates.AddItem "40.33" 'ListIndex = 0
    WagesCalculator.ComboBoxRates.AddItem "41.31" 'ListIndex = 1
    WagesCalculator.ComboBoxRates.AddItem "42.41" 'ListIndex = 2
    WagesCalculator.ComboBoxRates.AddItem "44.48" 'ListIndex = 0
    WagesCalculator.ComboBoxRates.AddItem "46.16" 'ListIndex = 1
    WagesCalculator.ComboBoxRates.AddItem "36.74" 'ListIndex = 2
    'Combo box values are column(1) values.
    WagesCalculator.ComboBoxRates.BoundColumn = 1
    'Set combo box to first entry
    WagesCalculator.ComboBoxRates.ListIndex = 0


    End Function