Article ID: 242723 - View products that this article applies to.
This article was previously published under Q242723
In Microsoft Project, when you run a Microsoft Visual Basic for Applications macro that assigns a material resource, you may receive the following error message:
Run-time error '1101':
The argument value is not valid.
This behavior occurs when you run a Visual Basic for Applications macro that uses the Add method to assign a material resource and includes a variable material consumption rate in the Units value, for example, 2/d or 2/wk.
For example, the following macro generates the error described above:
This behavior occurs because the Units argument of the Add method accepts only an integer or decimal value. Other alphanumeric characters are invalid.
Note that if the macro is assigning a work resource rather than a material resource, a percent (%) sign included in the Units value generates the same error.
Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific requirements.
To work around this problem, assign the material resource first; then modify the units for the assignment to add the variable material consumption rate.
For example, the following macro assigns a material resource and then changes its units to 2 per day:
Article ID: 242723 - Last Review: March 22, 2013 - Revision: 6.0
Contact us for more help
Connect with Answer Desk for expert help.