The first issue is whether you have a written lease. If you do, you need to look at the terms of your lease to determine what, if anything, it says about access.
If you do not have a written lease, or your lease is silent about access, the next issue is whether or not your landlord is covered by the state's landlord-tenant act. (Virginia Code, Sec. 55-248.5(A)(10), except for certain health and safety violations, "the following conditions are not governed by this chapter... Occupancy in single-family residences where the owner(s) are natural persons or their estates, who own in their own name, no more than ten single-family residences subject to a rental agreement..."). If your landlord is not covered, you can investigate to see if any local ordinances apply.
The third issue is, what are your damages? You were given less than a day's notice on two occasions, but your room was only shown on one of those two occasions. Are you claiming a bit of annoyance or embarrassment? Even if you can prove that your landlord violated your rights, if you suffered no meaningful injury what would you hope to accomplish?
Given the facts that you have shared, you should consider yourself to be on standing notice that your room may be shown to a potential buyer at any reasonable time. Although if we were to assume that the landlord-tenant act covered your situation, your landlord would be required to give you "notice of his intent to enter", the statutory 24 hour rule applies only to notice that must be given routine maintenance unless it's impractical to do so.
You will have to decide what, if anything, you are going to do about any remaining maintenance issues. Those are separate from the issue of showing your room to prospective buyers.

