![]() ![]() Now, you have to assign the above macro to the switch, so that when you click on it, it will do all the things which we have written in the code.Īnd, now we have to write a code for the second phase of the switch (converting to off phase) which will include changing its position to the right, changing its color to red & changing its inner text to “OFF”. In the above code, I have fixed, its increment to left by 46, changed its text to “On” & changed its color to green. Worksheets(1).Shapes("Button").Select ' Change Position, Color & Text ![]() Now, It’s time to write a code to change its position, color & inner text on click. When our switch in off phase, we need a macro to on the switch(converting it to ON phase) by changing its position to the left, changing its color to green & changing its inner text to “ON”. We need to write two macros to control both of the phases of the switch, on & off phase. I have inserted a simple shape to use as a button.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |