The Schrödinger equation $$-\Delta u+q(x)u -\lambda u=W(x)| u |^{2^*- 2} u\tag 1$$ is studied in $\bbfR^n$, $n\ge 4$. Here $2^*= 2n/(n-2)$ is the critical Sobolev exponent, $\lambda$ is a real number, $q$ is continuous, nonnegative and tends to infinity at infinity and $W$ is continuous, nonnegative and bounded. It is known that (1) may fail to have positive solutions if this exponent is raised, and if the exponent is lowered standard variational methods based on the Palais-Smale condition can be effective. The main thrust of this paper is to establish the existence of a nontrivial solution of (1). This is done by assuming that $q$ vanishes at a global maximum point of $W$ at which $W$ is Lipschitz continuous and using this condition to determine a range of level sets for which the variational functional for (1) satisfies the Palais-Smale condition. The result is then established by appealing to Theorem 2.4 of {\it P. Bartolo}, {\it V. Benci} and {\it D. Fortunato} [Nonlinear Anal., Theory Methods Appl. 7, 981-1012 (1983;

Zbl 0522.58012)]. The paper ends by showing that the Palais-Smale condition always holds in the case $W$ is negative so (1) has a nontrivial solution in this case also.