The invention avoids charge up when creating a focus map for an electron beam apparatus for inspecting a sample. An auto-focus (AF) control apparatus controls to drive an actuator for moving a focus lens of an optical microscope while acquiring a contrast signal from the optical microscope for each of focus measurement points on a surface of a sample under control of a PC device, to automatically focus on the surface of the sample. The control apparatus detects a focus value of the optical microscope corresponding to a position (height) of the sample surface in an optical axis direction. The PC device receives the detected focus value, and converts the focus value into a voltage to be applied to an electrostatic lens of the electron beam device during actual sample inspection, and stores the converted value.