How to select by code and also expand it?

Check this thread for more info: