Home » excel » Excel VBA – How to define Prop in ThisWorkbook.ContentTypeProperties?

Excel VBA – How to define Prop in ThisWorkbook.ContentTypeProperties?

Posted by: admin May 14, 2020 Leave a comment

Questions:

I have an excel workbook that has properties that are from Sharepoint. I am trying to iterate through the properties through the use of

 For Each Prop In ThisWorkbook.ContentTypeProperties

However, I am getting an error saying “Variable not defined”.

The strange thing is I have another workbook that also iterates through the properties and that is working fine.

Does anyone know where I could be going wrong?

How to&Answers:

The error “Variable not defined” might be easy to fix. Does the code declare the variable Prop?

 Dim Prop As MetaProperty

Also, be sure that ThisWorkbook is what you want.