Type mismatch in method CoerStrToNum: STRING found, SHORT expected

Hi,

Here is my code :

Dim session As New NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim Count as Integer
Set db = session.CurrentDatabase
Set doc = db.GetProfileDocument(“Profile Doc 1”)
Count = cint(doc.counter(0))
Messagebox Count

I have this message “Type mismatch in method CoerStrToNum: STRING found, SHORT expected”.

I found other posts similar to mine but without clear solution.

Can you help me please ?

Jean-Pierre

Subject: Check for empty values

Make sure that the counter field in the document has a value. CInt will display a type mismatch error if you try to convert an empty string.

Subject: Wrong code

Thanks for you answer.

This pointed out I was using wrong code :-).

Jean-Pierre

Subject: Wrong code

Thanks for you answer.

This pointed out I was using wrong code :-).

Jean-Pierre