I am new to VBA and would like to learn from you. Have a look at this sample file:example_copy_delete_ranges.xlsm
My task was to add buttons to "Master" sheet that would copy / delete colored areas from sheets "green" and "red". The final document should have the structure like the one in "example" sheet.
Conditions:
- all green fields have to always be above the red fields
- the order of colored fields has to be maintained (when deleting one green/red field, only the last from the color added should be deleted; when adding new green/red, it must be added right behind the last of the same color)
- all options must be possible (only one or more reds / only one or more greens / both reds and greens / none)
I managed to do some of the coding, but it is not working properly in some cases. (And I lamely added some letters and numbers behind the colored fields that could be displayed in white, which would not be seen then. I did not manage anything without them.)
If anyone would be able to solve this neatly, I would love to look at the file (code) and learn from it.
Thank you!
Bookmarks