Could not set the RowSource property
cboTurbines.RowSource =
Thisworkbook.Names("turbines").ReferstoRange.Addre ss(1,1,,True)
--
Regards,
Tom Ogilvy
"TMesh" wrote in message
...
Hello
I have a form with a combo box that I show when the workbook is opened. I
set the RowSource property in the Intialize event of the UserForm using
the
following code:
'Load the turbine list box
cboTurbines.RowSource = "Turbines"
Where "Turbines" is a name defined within the current workbook.
My problem occurs when I save the workbook as an Add-In (XLA). I install
it
as an addin into another workbook and from within a procedure run the
following code:
frmInput.Show
When the initialize event runs with the same code above to populate the
ComboBox, I get the error message "Could not set the RowSource property.
Invalid proerty value" when trying to set the RowSource property of a
ComboBox.
I have tried to set the RowSource property to the following:
'Load the turbine list box
cboTurbines.RowSource = shtTurbines.Range("Turbines").Range.Value
With no success.
Would appreciate any help i could get to propery populate the ComboBox
when
the workbook is saved as and Excel Add-In.
Thanks
Tom
|