PoggiPJ
Active Member
- Joined
- Mar 25, 2008
- Messages
- 330
I would like to simulate a user selection in a ComboBox in WB2 from a macro that is running in WB1.
The name of the worksheet in WB2 that contains the ComboBox is "Inputs"
The ComboBox.name in WB2 is "inputPlanRateCountry"
In WB2 macros I can read the selected ComboBox value using (for example) CountrySelected = Inputs.inputPlanRateCountry.Value
But if when I try to assign something to the ComboBox .value or .text property from a statement in WB1, I encounter a "Method or data member not found" error.
Following is code from the macro in Workbook1....
Is there any way that I can enter a country value into that combo box, just as though a user had actually clicked/selected it?
The name of the worksheet in WB2 that contains the ComboBox is "Inputs"
The ComboBox.name in WB2 is "inputPlanRateCountry"
In WB2 macros I can read the selected ComboBox value using (for example) CountrySelected = Inputs.inputPlanRateCountry.Value
But if when I try to assign something to the ComboBox .value or .text property from a statement in WB1, I encounter a "Method or data member not found" error.
Following is code from the macro in Workbook1....
Code:
Set WB2 = Workbook2.Worksheets("Inputs")
WB2.inputPlanRateCountry.Value = WB1.Range("custSelectedPlanRate").Value