Quantcast
Channel: Project Customization and Programming forum
Viewing all articles
Browse latest Browse all 5347

Set a custom duration field using VBA throws the message "Invalid duration" when reopening the Project

$
0
0
  1. With a custom code we set Duration9 in Project 2013.
  2. After executing the code everything seems to be ok.
  3. After saving and reopening the Project it shows a message "Invalid Duration", and the value is shown as estimated (Questionmark).
  1. In VBA create following code:

Sub SetDuration()

    Dim newVal As Long

    newVal = 14400

    Tasks(1).Duration9 = newVal

End Sub

  1. Execute Code.
  2. Close VBA.
  3. Open the Project and you will get the same message box
  4. The only way as far as I found out is to manually retype the Duration in that field. What is not exactly what I want.

Is this a bug in MSP or a hidden Feature? Does anyone has an idea?

Best Regards Steffen




Viewing all articles
Browse latest Browse all 5347

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>