Hi varun,
Enable the macros and Try.
To enable Macros go to the below path:
File->Excel Options->Trust Center->Trust Center Settings->Macro Settings and then Check enable all macros radio button and Trust access to the VBA project object model
Thanks and Regards,
Basavaraj