I am working on a macro that another coworker created awhile back that is no longer with us, but I need to edit it and to add in extra information. For our part numbers, we use the configuration names instead of PRP_PartNo or any other properties like that. We found that it is easier to work with naming the configuration your part number for quick reference.
That being said, we are rolling out our ERP software but the folks in the purchasing department want to add internal stock material numbers (Raw Stock, Standardized Hardware List, Etc). Since we use the configurations as our part numbers, that leaves me with manually changing with configuration to user specified name. That value is $PARTNUMBER and to change it back to configuration base part number is $C in the $PARTNUMBER Value converts it back.
The macro I attached is in rough shape since I am in the middle of reorganizing the user form and some of the functions, so forgive the mess.
Here is the goal, I need to have row "EB Part # / CS" to fill in $PARTNUMBER (user specified in config manager) to any value I need to type. When the check box is checked, EB Part # / CS Value will overwrite the "Part #" row (Part # row is the Configuration name). When the EB Part # / CS check box is unchecked, the "Part #" row will then become the part number and the configuration manager is switched back to configuration specific property.
There is a lot going on in the macro, but I have tried in several locations to add in the $PARTNUMBER Property, but I am hitting a wall with the $ symbol. I have found a post about this (Access PART NUMBER via API? ), and I used the code in the link Deepak gave, but it messes with the "getConfigSpecificNames" line items in the macro. When I add ' to the "getConfigSpecificNames" lines, that then makes the macro not read to the properties tab (hence the read private sub). If this is the right route to use, how would I get the last part of the macro (thisConfig.AlternateName = "XXXX") to write to txt.EBCS/$PARTNUMBER.text and not XXXX?
Any help will be much appreciated because I am lost as to how to insert $PARTNAME when I cannot get any value express with a $ without a syntax error.