PhilippeMortreux
New Member
- Joined
- Jan 24, 2013
- Messages
- 3
Hello,
I am trying to change checkboxes caption name using a loop so that I don't have to change them individually.
Here is a simplified example of what want to do:
1) I save the caption names in a array
2) I run through a loop to rename each checkboxes using the names saved in the array
Sub change_Checkbox_Caption
Dim MyArray(1to3) as string
Dim IndexMyArray as integer
MyArray(1) = "YES"
MyArray(2) = "No"
MyArray(3) = "Maybe"
For indexMyArray = 1 to 3
Sheets(1).checkbox& IndexMyArray.Caption =MyArray(IndexMyArray).value
Next indexMyArray
end sub
I am really stucked, if you have a solution to suggest it would be very helpful
Thankfully
-Phil
I am trying to change checkboxes caption name using a loop so that I don't have to change them individually.
Here is a simplified example of what want to do:
1) I save the caption names in a array
2) I run through a loop to rename each checkboxes using the names saved in the array
Sub change_Checkbox_Caption
Dim MyArray(1to3) as string
Dim IndexMyArray as integer
MyArray(1) = "YES"
MyArray(2) = "No"
MyArray(3) = "Maybe"
For indexMyArray = 1 to 3
Sheets(1).checkbox& IndexMyArray.Caption =MyArray(IndexMyArray).value
Next indexMyArray
end sub
I am really stucked, if you have a solution to suggest it would be very helpful
Thankfully
-Phil