We use Floer homology to study the Hofer-Zehnder capacity of neighborhoods near a closed symplectic submanifold M of a geometrically bounded and symplectically aspherical ambient manifold. We prove that, when the unit normal bundle of M is homologically trivial in degree dim(M ) (for example, if codim(M ) > dim(M )), a refined version of the Hofer-Zehnder capacity is finite for all open sets close enough to M . We compute this capacity for certain tubular neighborhoods of M by using a squeezing argument in which the algebraic framework of Floer theory is used to detect nontrivial periodic orbits [18, 19,26]. As an application, we partially recover some existence results of Arnold [1] for Hamiltonian flows which describe a charged particle moving in a nondegenerate magnetic field on a torus. Following [43], we also relate our refined capacity to the study of Hamiltonian paths with minimal Hofer length.