Have a problem with set resource cost Parameter via vba

F

Frank Huebener

Hello my problem is its impossible for me to create a resource and set the
cost parameter.

Whats wrong ?

My error is Number 424 (need an object ???)

Without

..cost = 34

etc. everything works fine.

----------------------------------------------
----------------- Here is my sample source ? Start
----------------------------------------------
Dim reccnf As New ADODB.Recordset
Dim name, vorname As String

Dim resource_name As String
Dim sqlarchivstr As String
Dim thedelete_flag As String
Dim contact_dummy As String
Dim the_tab_custs As String 'zeiten kosten reisekosten ?

sqlarchivstr = "select from myownressourcetable"

reccnf.ActiveConnection = thedb_connection
reccnf.Source = sqlarchivstr
reccnf.CursorType = adOpenForwardOnly
reccnf.LockType = adLockReadOnly
reccnf.Open

If reccnf.RecordCount > 0 Then

Do Until reccnf.EOF


resource_name = reccnf("theresourcename") & " " &
reccnf("theresourcefirstname")

With ActiveProject.Resources.Add(resource_name)

If Not IsNull(reccnf("res_email1")) Then .EMailAddress =
reccnf("res_email1")

.Initials = CStr(reccnf("akt_id"))

.Cost = 34 'here is the error

End With

reccnf.MoveNext

Loop

reccnf.Close

End If
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top