Check if the signature of the method is as follows
Dim UpdateOrAddNewRecord(Dim ID As String,Dim Company As String , Dim Name as String,Dim Title as String,Dim Address As String,Dim Country as String,Dim flag as booean)
Either you need to change the signature of this method or the datatypes declared in the above code as per your functionality