The frequency controls the speed, so the max rpm you'll be able to get is 2/3 of the spindles max. So if it's an 18,000 rpm spindle, it'll only run at 12,000 when you set the VFD to 400Hz.
You should still be running it at full voltage and amps, though.