J
Jim Zeeb
I've encountered a problem with some code that used to work just fine.
I'm trying to access a Resource and update some of the custom fields with
data from an Excel spreadsheet.
Here is my code:
resFound = msp.Find(Field:="Name", Test:="equals", MatchCase:=False, _
Value:=Trim(lastName) & " " & Trim(firstName))
If resFound Then
AppActivate msp.projects(1).Name
Set res = msp.ActiveSelection.Resources(1)
End if
msp is the Application object for the MsProject file that is open.
res is defined as Object (for LateBinding purposes)
I have already set the view to ResourceSheet and the correct resource name
is selected.
I'm getting a 424 Object Required error.
In the Immediate window, msp.ActiveSelection.Resources.Count returns "1"
This is probably something simple, but I'm not seeing it.
I know I could loop through all the resouces looking for a match, but the
Find should be a lot quicker.
inTHANKSadvance
....jz
I'm trying to access a Resource and update some of the custom fields with
data from an Excel spreadsheet.
Here is my code:
resFound = msp.Find(Field:="Name", Test:="equals", MatchCase:=False, _
Value:=Trim(lastName) & " " & Trim(firstName))
If resFound Then
AppActivate msp.projects(1).Name
Set res = msp.ActiveSelection.Resources(1)
End if
msp is the Application object for the MsProject file that is open.
res is defined as Object (for LateBinding purposes)
I have already set the view to ResourceSheet and the correct resource name
is selected.
I'm getting a 424 Object Required error.
In the Immediate window, msp.ActiveSelection.Resources.Count returns "1"
This is probably something simple, but I'm not seeing it.
I know I could loop through all the resouces looking for a match, but the
Find should be a lot quicker.
inTHANKSadvance
....jz