AnsweredAssumed Answered

Method or data member not found

Question asked by Kaijiun Cheang on Apr 12, 2015
Latest reply on Apr 13, 2015 by Kaijiun Cheang

Hi all,


I am a newbie in VBA and in attempt to create a macro to do batch file running, by substituting recorded macro into it.


Attached file is  "open&save as part number" - that had been paste with code.


"Solidlead" is the file that i recorded.


As i try to run it, the compiler shows up the warning"method or datamember not found" for some code lines, such as :
boolstatus = Part.Extension.SetUserPreferenceToggle(swUserPreferenceToggle_e.swDimensionsExtensionLineStyleSameAsLeader, swUserPreferenceOption_e.swDetailingHoleDimension, False)


If i remove those lines, it runs without problem.


I wonder what's wrong with the code? If i run solidlead by itself, there is no problem. But if i paste it to the other one, it shows that error.