all. I have a table in the worksheet called lookupMisc called periodNo (A) and periodName (B) with the following values.
A B
1 09:00
2 10:00
3 11:00
4 12:00
5 13:00
6 14:00
7 15:00
8 16:00
9 17:00
The code for this as follows:
For i = 1 To ws_misc.Range("periodNo").Rows.Count
CombinedName = periodNo(i, 1) & " - " & periodName(i, 1)
cbo_period.AddItem CombinedName
Next i
and thsi generates:

Now you will notice that there is a Length (txt_length) text field to the right. Basically I am trying to create a form of dynamic validation based on the entry that period has. Here are the cases:
If user selects Then
1 - 09:00 Length can only accept values from 1-9
2 - 10:00 Length can only accept values from 1-8
3 - 11:00 Length can only accept values from 1-7
4 - 12:00 Length can only accept values from 1-6
5 - 13:00 Length can only accept values from 1-5
6 - 14:00 Length can only accept values from 1-4
7 - 15:00 Length can only accept values from 1-3
8 - 16:00 Length can only accept values from 1-2
9 - 17:00 Length can only accept values from 1-1
How would I go about accomplishing this?
Try something like: