For a spatially resolved analysis of element distributions in inhomogeneous samples by means of PIXE, we equipped our microprobe with a scanning and data-handling system based on a PDP 11/44 computer with CAMAC interface. This system is capable of program-controlled beam movement on the target surface, in order to follow the optimum scan path required for the analysis of a certain type of sample. X-ray events are processed with respect to the actual beam position. Element distributions can be determined on-line by selecting software single channels, or — in order not to lose any of the information supplied by the experiment — all X-ray events together with the actual beam position can be stored in list mode on magnetic tape. This enables us to perform off-line analysis of the data with more sophisticated programs. The most significant features of our scanning and data-handling system will be described; its advantages will be demonstrated by measurements on biological samples.