T
TroyS
I'm working on a vba solution to copy EnterpriseNumber2 (task level) to
another EnterpriseNumber39 (task level) (for example...there is more to this
than that, but this is the 1st step)
EnterpriseNumber2 is a counter (a 1 or a 0) based on a text field. If a
particular value in the text field is true, then 1, else 0.
I can copy the values from EnterpriseNumber2 value to say a Number3 field.
But if i try to copy the EnterpriseNumber2 value to an EnterpriseNumber3
(task level) field, i get an error in my macro.
Below are the 2 sample macros. 1 works, 1 does not. Why can't i copy from a
Task EnterpriseNumber field to another Task EnterpriseNumber field?
The error is:
Run Time Error '1101'
The Argument is not valid
When i select debug, the editor goes to the line where i assign/copy the
value in EnterpriseNumber2 to EnterpriseNumber39....
Sample Macro that does not work:
Sub Testing()
Dim T As Task ' Task object used in For Each loop
For Each T In ActiveProject.Tasks
If T Is Nothing Then
GoTo Line1
Else
T.EnterpriseNumber39 = T.EnterpriseNumber2
End If
Line1:
Next T
Sample Macro that does work:
Sub Testing()
Dim T As Task ' Task object used in For Each loop
For Each T In ActiveProject.Tasks
If T Is Nothing Then
GoTo Line1
Else
T.Number1 = T.EnterpriseNumber2
End If
Line1:
Next T
another EnterpriseNumber39 (task level) (for example...there is more to this
than that, but this is the 1st step)
EnterpriseNumber2 is a counter (a 1 or a 0) based on a text field. If a
particular value in the text field is true, then 1, else 0.
I can copy the values from EnterpriseNumber2 value to say a Number3 field.
But if i try to copy the EnterpriseNumber2 value to an EnterpriseNumber3
(task level) field, i get an error in my macro.
Below are the 2 sample macros. 1 works, 1 does not. Why can't i copy from a
Task EnterpriseNumber field to another Task EnterpriseNumber field?
The error is:
Run Time Error '1101'
The Argument is not valid
When i select debug, the editor goes to the line where i assign/copy the
value in EnterpriseNumber2 to EnterpriseNumber39....
Sample Macro that does not work:
Sub Testing()
Dim T As Task ' Task object used in For Each loop
For Each T In ActiveProject.Tasks
If T Is Nothing Then
GoTo Line1
Else
T.EnterpriseNumber39 = T.EnterpriseNumber2
End If
Line1:
Next T
Sample Macro that does work:
Sub Testing()
Dim T As Task ' Task object used in For Each loop
For Each T In ActiveProject.Tasks
If T Is Nothing Then
GoTo Line1
Else
T.Number1 = T.EnterpriseNumber2
End If
Line1:
Next T