I have a ComboBox (Quart1) in a userform with the ff list of items added at Userform Initialize:
What I want to do is when, say "Q1 (Jan to Mar)" is selected, the value of the ComboBox to show "Q1" instead of "Q1 (Jan to Mar)". I use the the following code but I am getting invalid value property at Me.Quart1.VAlue = "Q1" line.
VBA Code:
Private Sub UserForm_Initialize()
With Quart1
.AddItem "Q1 (Jan to Mar)"
.AddItem "Q2 (Apr to Jun)"
.AddItem "Q3 (Jul to Sep)"
.AddItem "Q4 (Oct to Dec)"
End With
What I want to do is when, say "Q1 (Jan to Mar)" is selected, the value of the ComboBox to show "Q1" instead of "Q1 (Jan to Mar)". I use the the following code but I am getting invalid value property at Me.Quart1.VAlue = "Q1" line.
VBA Code:
Private Sub Quart1_Change()
Me.QuarterLabel.Caption = "Select Year"
If Quart1.Value = "Q1 (Jan to Mar)" Then
Me.Quart1.Value = "Q1"
End If
End Sub