Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub CommandButton1_Click()
- ActiveCell.Value = ComboBox1.Value
- ActiveCell.Offset(0, 1) = ComboBox2.Value
- End Sub
- Private Sub UserForm_Initialize()
- If ActiveCell.Value = vbNullString Then
- With ComboBox1
- .AddItem "Meal"
- .AddItem "Educat"
- End With
- Else
- With ComboBox1
- .AddItem "Income"
- End With
- End If
- If Me.ComboBox2.Value = "Income" Then
- With ComboBox2
- .AddItem "Grant"
- .AddItem "Parents"
- End With
- ElseIf Me.ComboBox2.Value = "Meal" Then
- With ComboBox2
- .AddItem "Food"
- .AddItem "Drink"
- End With
- Else
- With ComboBox2
- .AddItem "Books"
- .AddItem "Fees"
- End With
- End If
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement