The vaccine works for people who are not infected with the hepatitis B virus. People with acute or chronic hepatitis B do not benefit from the vaccine.