No. Long answer: Removing the CMOS battery (CR2032) for 24 hours will reset the RTC (Real Time Clock) and potentially user settings (like boot order), but it will not clear the administrator password on a G7. The password is stored in the Intel Management Engine (ME) region of the BIOS flash, which is non-volatile.
For the HP EliteBook 840 G7 Go to product viewer dialog for this item. hp elitebook 840 g7 bios password reset