Silicon microcantilevers can be used to measure the rheological properties of complex fluids. In this paper two different methods will be presented. In the first method the microcantilever is used to measure the hydrodynamic force exerted by a confined fluid on a sphere that is attached to the microcantilever. In the second method the measurement of the microcantilever’s dynamic spectrum is used to extract the hydrodynamic force exerted by the surrounding fluid on the microcantilever. The originality of the proposed methods lies in the fact that not only may the viscosity of the fluid be measured but also the fluid’s viscoelasticity, i.e., both viscous and elastic properties, which are key parameters in the case of complex fluids. In both methods the use of analytical equations permits the fluid’s complex shear modulus to be extracted and expressed as a function of shear stress and/or frequency.