WarPigl3t
Well-known Member
- Joined
- May 25, 2014
- Messages
- 1,611
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Drop Down List
[/TD]
[/TR]
</tbody>[/TABLE]
Imagine A1 has a Drop Down List(DDL) and there are 3 values in that list.
Values:
I know how to attach a Subroutine to a button.
I want to know how to pass the values of the drop down list into a variable in VBA.
So variableDDL(0) should be "dog"
variableDDL(1) should be "cat"
variableDDL(2) should be "unicorn"
I also need to know how to count how many values there are in that array. In this array, there are 3 values(dog,cat,unicorn).
My goal here is to select one of those three values and display it in cell A1. I want it to choose one of those values at random.
*Backround: The above example is just to explain things easily. My actual excel file is an Employee Work Schedule Builder. I want the schedule to build itself at the push of a button. I'm just letting you know so you don't think that I'm doing something stupid with dogs, cats, and unicorns. haha
<tbody>[TR]
[TD][/TD]
[TD]A
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]Drop Down List
[/TD]
[/TR]
</tbody>[/TABLE]
Imagine A1 has a Drop Down List(DDL) and there are 3 values in that list.
Values:
- dog
- cat
- unicorn
I know how to attach a Subroutine to a button.
I want to know how to pass the values of the drop down list into a variable in VBA.
So variableDDL(0) should be "dog"
variableDDL(1) should be "cat"
variableDDL(2) should be "unicorn"
I also need to know how to count how many values there are in that array. In this array, there are 3 values(dog,cat,unicorn).
My goal here is to select one of those three values and display it in cell A1. I want it to choose one of those values at random.
*Backround: The above example is just to explain things easily. My actual excel file is an Employee Work Schedule Builder. I want the schedule to build itself at the push of a button. I'm just letting you know so you don't think that I'm doing something stupid with dogs, cats, and unicorns. haha