microsoft-project-vba

How to SelectRow of a Task in Sub-Project (inside a Master-Project)

耗尽温柔 提交于 2019-12-11 01:48:48
问题 I have a Master-Project, and inside it I have several Sub-Projects. I want to format the Color of the Rows based on a value of a field Text5 . Current Problem : How to use VBA code to refer to the Row in the 2nd Sub-Project. When I run the code, and I modify Text5 value in Task ID 5 (in Sub-Project 2), it modifies the color of Task ID 5, but of Sub-Project 1. How can I use the SelectRow and add refference to the desired Sub-Project ? My Code (relevant section) Sub FormatChangedTasks() Dim

Loop through each field for MS Project

假装没事ソ 提交于 2019-12-04 04:51:07
问题 I am trying to loop through each field in my MS Project file and gather information about that field (custom name is particular). What is the easiest way to do this? Thanks 回答1: To get the custom name of a field you'll need the field constant and to loop through all fields, you'll need to store a list of all field constants. Here is a simple example to get you started. I hard-coded an array of the field constants for the Task Text1-30 fields. Sub GetCustomFieldNames() Dim TextFields As

Loop through each field for MS Project

ぃ、小莉子 提交于 2019-12-02 02:04:00
I am trying to loop through each field in my MS Project file and gather information about that field (custom name is particular). What is the easiest way to do this? Thanks To get the custom name of a field you'll need the field constant and to loop through all fields, you'll need to store a list of all field constants . Here is a simple example to get you started. I hard-coded an array of the field constants for the Task Text1-30 fields. Sub GetCustomFieldNames() Dim TextFields As Variant TextFields = Array(188743731, 188743734, 188743737, 188743740, 188743743 _ , 188743746, 188743747,