azizrasul
Well-known Member
- Joined
- Jul 7, 2003
- Messages
- 1,304
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
I have a form upon which is a combo box. When I initialise the form, I have the following line
I get the error "Could not set the ListIndex property, Invalid Property Value.
The value I get for Sheets("Current").Range("Show_CP_Prem_Choice") is 2. Sheets("Current").Range("Show_CP_Prem_Choice") are the following values i.e. Yes, No and Modular.
AG
10 Yes
11 No
12 Modular
Code:
cboShow_CP.ListIndex = Sheets("Current").Range("Show_CP_Prem_Choice") - 1
I get the error "Could not set the ListIndex property, Invalid Property Value.
The value I get for Sheets("Current").Range("Show_CP_Prem_Choice") is 2. Sheets("Current").Range("Show_CP_Prem_Choice") are the following values i.e. Yes, No and Modular.
AG
10 Yes
11 No
12 Modular