I have a list of variables that contain answers Yes and No, I am trying to replace them with 1 and 0 and make all of them numeric
The command that I use is the following:

foreach var in MY LIST OF VARIABLES {
replace `var' = 0 if `var'==`No'
replace `var' = 1 if `var'==`Yes'
destring `var', replace
}


Stata responds "no variables defined". I would appreciate your help on this.
Thank you in advance!