I am trying to share a workbook but it is always throwing an error shown in SS attached.
I have already confirmed their is no XML maps and or tables in workbook.
You cannot share a workbook if it contains tables or XML maps. This is one of the limitations of Sharing Workbook. Basic thought behind it is that shared workbook is prone to become corrupt and hence affects the functionality of some features including data tables. I am sure that the Workbook you are referring contains tables if not XML maps.
If you go to Formulas tab of the Ribbon > Name Manager you will see Table names listed amongst other defined names. you need to convert that table/s to range and then you will be able to share the workbook.
Since I have 60 sheets in the workbook so it was hard for me to work on every sheet. I worked hard and wrote a code to convert all tables to data ranges.
I am sharing it if it might help someone else.
Code:
Dim wks as worksheet, objList as listobject
for each wks in activeworkbook.worksheets
for each objlist in wks.listobjects
objlist.unlist
next objlist
next wks