This paper describes a new technique for automatically developing Artificial Neural Networks (ANNs) by means of an Evolutionary Computation (EC) tool, called Genetic Programming (GP). This paper also describes a practical application in the field of Data Mining. This problem has already been extensively studied with other techniques, and therefore this allows the comparison with other tools. Results show how this technique improves the results obtained with other techniques. Moreover, the obtained networks are simpler than the existing ones, with a lower number of hidden neurons and connections, and the additional advantage that there has been a discrimination of the input variables. As it is explained in the text, this variable discrimination gives new knowledge to the problem, since now it is possible to know which variables are important to achieve good results.