If a nuclear microprobe with a beam size in the submicron region is to be attained, an objective measure of beam profile is a prerequisite. We have developed an automatic beam-focusing system for the Lund achromatic lens system. Using a knife-edge method, projections of the beam profile are determined. The resolutions of the measured profiles are then used as feedback in an automatic focusing procedure which uses computer-controlled power supplies for the electrostatic and magnetic focusing lenses. The beam spot size is minimized using a modified SIMPLEX iterative method. The system can use signals from any detectors, which permits it to be used informing the highest resolution microbeams.