Hello again NARAYANK991,
I deleted wb in an attempt to find my error and forgot to put it all back before posting the message.
It's on the line:
wb.Names.Add Name:=ws3.Cells(1, Col), RefersTo:=ws3.Range(Cells(2, Col), Cells(Row, Col))
My macro includes the following code to go with wb...