How to make string become color type?

In the set range color activity, it needs to put color type in the color input box.
If I want to set the different colors in a cell by for each loop, how to make the color change?
I mean how to put a variable in system.drawing.color.(variable)?


I am thinking to input “system.drawing.color.”+ variable
but it’s string type not color type…it’s not accept.

you can try to translate the color name from string to color , i.e from “red” to color[red],
this can be done using color translator method , which converts the string value of color into color of type system.drawing.color




Try the below code

1 Like

It works. Thanks a lot!!

You are welcome

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.