Your example with concocted data works:
clear
set more off
*----- example data -----
set obs 5
gen Q3_9 = 33
gen Q3_10 = "dog"
gen P4_5 = 56
gen Q3_11b = 24
gen weight = runiform()
svyset weight
qui: ds Q3_9-Q3_11b, has(type numeric)
display "`r(varlist)'"
*----- what you want -----
foreach i in `r(varlist)' {
qui: tabout `i' using "H:\Electricity1.xls", ///
c(prop ci) f(3) svy append show(none) clab("`i'")
}
Preferable is
foreach i of varlist `r(varlist)' {
qui: tabout `i' using "H:\Electricity1.xls", ///
c(prop ci) f(3) svy append show(none) clab(`i')
}
because you make explicit that your list contains variables. Additionally, Stata checks if the variables in the list exist, so any related error is caught before entering the loop.
(The clab() option works with quotes, but the help file indicates you don't need them.)
If you still have problems, run describe before the loop and edit your question to include Stata's output.