S
Sean
I'm working on a macro to close out a project. So far, I've had no
problem zeroing out remaining work. But we also want to change each
resource's booking type to 'Proposed'. I've tried various expressions
in VBA, but so far I've either gotten a 1004 error or a(n) 1101.
Here's the relevant snippets of my code:
Dim Rsrc As Resource
' Set Resource Booking Type to Proposed
For Each Rsrc In ActiveProject.Resources
ActiveProject.Resources(Rsrc).bookingtype =
pjBookingTypeProposed
MsgBox (Rsrc.Name)
Next Rsrc
You'll notice that it doesn't want to capitalize the "bookingtype"
portion, even though it recognizes it and prompts me for the
pjBookingTypeProposed. I tried using the SetField method, but those
only gave me 1101 errors. this one gives me the run-time error 1004
"an unexpected error occurred with the method."
Based on other threads here, I couldn't figure out why this code did
not work. Any thoughts?
Other threads on topic:
http://groups.google.com/group/micr...lnk=gst&q=bookingtype&rnum=1#337489bdfbf94c04
http://groups.google.com/group/micr...lnk=gst&q=bookingtype&rnum=9#df7fb619b17aceae
Thank you!
problem zeroing out remaining work. But we also want to change each
resource's booking type to 'Proposed'. I've tried various expressions
in VBA, but so far I've either gotten a 1004 error or a(n) 1101.
Here's the relevant snippets of my code:
Dim Rsrc As Resource
' Set Resource Booking Type to Proposed
For Each Rsrc In ActiveProject.Resources
ActiveProject.Resources(Rsrc).bookingtype =
pjBookingTypeProposed
MsgBox (Rsrc.Name)
Next Rsrc
You'll notice that it doesn't want to capitalize the "bookingtype"
portion, even though it recognizes it and prompts me for the
pjBookingTypeProposed. I tried using the SetField method, but those
only gave me 1101 errors. this one gives me the run-time error 1004
"an unexpected error occurred with the method."
Based on other threads here, I couldn't figure out why this code did
not work. Any thoughts?
Other threads on topic:
http://groups.google.com/group/micr...lnk=gst&q=bookingtype&rnum=1#337489bdfbf94c04
http://groups.google.com/group/micr...lnk=gst&q=bookingtype&rnum=9#df7fb619b17aceae
Thank you!