PDA

View Full Version : [SOLVED] Modules not accessing userform objects



arnoldasz
06-30-2018, 01:15 AM
Hello,

I have created a user form and I have written all the code under Forms->formMenu object. Everything used to work, but the code looks a little messy, when everything is in one file, so I have decided to split all my code in to separate modules.

Now, the question is, is it possible to control userform objects, like ComboBox or Button, in modules, stored in 'Modules->Main_Module', for example?

I can show my user form from any procedure in any module, just by calling formMenu.Show, but comboBoxCableTypes.Enabled gives me 'undefined variable' error, when I try to use it in my module.

I hope you understand what I mean.

JKwan
06-30-2018, 05:56 AM
formname.comboboxname.enable