antifragile
New Member
- Joined
- Dec 22, 2014
- Messages
- 13
Hi,
I would like a vba code that allows me to select the entire row of the selected cell, doubles the row height(or to certain height), and fills the row background color with, say, turquoise. Also, when I select another cell or row, I would like the previously selected row to go back to its original format, size and fill color.
So far I was able to figure out selecting the entire row of the selected cell, I can also increase the row height but I cannot have it go back to its original formatting when I select another cell or row.
My code is something like below:
Any ideas are greatly appreciated.
Thanks,
I would like a vba code that allows me to select the entire row of the selected cell, doubles the row height(or to certain height), and fills the row background color with, say, turquoise. Also, when I select another cell or row, I would like the previously selected row to go back to its original format, size and fill color.
So far I was able to figure out selecting the entire row of the selected cell, I can also increase the row height but I cannot have it go back to its original formatting when I select another cell or row.
My code is something like below:
Code:
[COLOR=#011993][FONT=Menlo]Private[/FONT][/COLOR][COLOR=#011993][FONT=Menlo]Sub[/FONT][/COLOR][COLOR=#000000][FONT=Menlo] Worksheet_SelectionChange([/FONT][/COLOR][COLOR=#011993][FONT=Menlo]ByVal[/FONT][/COLOR][COLOR=#000000][FONT=Menlo] Target [/FONT][/COLOR][COLOR=#011993][FONT=Menlo]As[/FONT][/COLOR][COLOR=#000000][FONT=Menlo] Range)[/FONT][/COLOR][COLOR=#000000][FONT=Menlo]ActiveCell.EntireRow.Select[/FONT][/COLOR]
[COLOR=#000000][FONT=Menlo]Selection.RowHeight = 32[/FONT][/COLOR]
[COLOR=#011993][FONT=Menlo]EndSub[/FONT][/COLOR]
Any ideas are greatly appreciated.
Thanks,