If you catch her in the act then yes, a loud & firm NO, & IMMEDIATELY take her outside, give her her potty command and praise when she goes outside.

If you don't catch her in the act than don't say anything, just take her outside right away, praise when she goes.

Do not let her see you clean up the mess.