Neurons show plasticity in neuronal and synaptic properties due to development and/or learning, affecting both the input levels to the neuron as well as the neural excitability. However, neurons have a limited dynamic range, i.e. the range over which they are sensitive to the input and are not in either a quiescent or a saturated activity state. This suggests neurons possess control mechanisms that match neural excitability and synaptic input levels. Recent experimental studies suggest that neurons indeed show a homeostatic scaling of excitability (HSE) by sensing activity levels and adapting the neural excitability via regulation of specific membrane conductance densities. The maintenance of sensitivity to synaptic input is also central to learning processes. In one form of learning it has been demonstrated that synaptic modification depends on the exact timing of presynaptic inputs and postsynaptic spikes. The performance of this spike timing dependent plasticity (STDP) is expected to be affected by a decrease in the sensitivity of the neuron to its input. At the one hand this suggests an important role for HSE in the functioning of STDP, at the other hand it leads to the question whether HSE could interfere with the learning of input patterns via STDP. Here, we address these issues by using both mathematical analysis and numerical simulations of a neuron that shows HSE and that receives input from synapses showing STDP. Based on experimental results, HSE is implemented as activity-dependent shifts of the input-output function. We use the multiplicative formulation of STDP in which the changes in synaptic strength depend on the synaptic strength itself. We show that while background input levels vary greatly, HSE keeps the neuron within its dynamic range and does not affect the synaptic weight distribution. HSE can also easily compensate for variations in the shape of the STDP learning window and maintain the sensitivity to correlations in the input. However, in neurons without HSE, the sensitivity to correlations in the input depends strongly on the various parameters. The effects of HSE are further explored by examining the neuron response to input patterns. We show that when neural excitability is controlled by HSE, STDP leads to changes of the synaptic weights as a function of the properties of the input pattern, i.e. the number of inputs forming the pattern and the strength of the correlation within the pattern. Learning of a pattern increases the probability of it generating a postsynaptic spike, depending on the properties of the pattern. HSE makes the effect of learning input patterns almost independent of the background levels. The results suggest HSE does not interfere with STDP and that HSE has a central role in maintaining the learning capabilities of the neuron in its highly plastic environment.