Hello,

I found nothing helpful on the forum (well, there is this post but I would like to know if an alternative solution can be found) so I start my first post.

I am coding a function AAA which, at a point of time, needs to call an other function BBB to get an intermediate outcome.

My BBB function ends up by updating the “RowSource” propriety of a ComboBox belonging to the userform (let’s say Form_BBB) from which it is usually called.

My problem is that when my AAA function is calling my BBB function I get an error because the Form_BBB is not loaded. To solve this problem, I would like to test if Form_BBB is loaded before updating the RowSource of my ComboBox_BBB, but without loading the form if it is not (so in can’t use the Form_BBB proprieties).

It should be something like:

Does anyone can help??

Thanks

I found nothing helpful on the forum (well, there is this post but I would like to know if an alternative solution can be found) so I start my first post.

I am coding a function AAA which, at a point of time, needs to call an other function BBB to get an intermediate outcome.

My BBB function ends up by updating the “RowSource” propriety of a ComboBox belonging to the userform (let’s say Form_BBB) from which it is usually called.

Code:

Public Sub BBB() Dim Range_BBB as Range <Code> Form_BBB.ComboBox_BBB.RowSource = Range_BBB End Sub

It should be something like:

Code:

Public Sub BBB() Dim Range_BBB as Range <Code> If isLoaded Form_BBB then Form_BBB.ComboBox_BBB.RowSource = Range_BBB End if End Sub

Thanks

## Comment