AnsweredAssumed Answered

Write to Property Tab Builder's Date field with Date format through VBA

Question asked by Nic Brunsting on Apr 13, 2015
Latest reply on May 12, 2016 by Nic Brunsting

Hi All,


I have a macro written that populates custom properties with values.  One is initials of the current user, the other is the current date.  The desired effect is to populate a "Created By" and "Created Date" when the user first saves the file.  We use the Property Tab Builder with a date format so while in the part, you can select the current date from the calendar drop down.


My macro populates the two fields using this code: [swCustPropMgr.Set "DESIGNED DATE", Date] and it seems to work fine in the actual properties tab (Summary Information > Custom).  However, because of the date formatting in the property tab builder, it does not put any data into the property tab builder field.  When the part is saved, the blank data in the PTB overwrites the correct data in the properties (Summary Information > Custom).


I've tried changing changing the formatting in the PTB from Date to Text, which doesn't help either.  I put a property underneath [SW-Short Date" and called it "Date Format" to encourage proper date formatting.


Is it a problem with writing a date to the PTB?  Any help in writing to the date field with a date or text format?