Domino 9 und frühere Versionen > Entwicklung

Lotuscript type mismatch error

(1/2) > >>

StoneCold:
I have a local Lotus Notes application running ok in Notes 5.0.9, but when we run it in Notes Client 6.0.3, we get a type mismatch error in a function that tries to locate an embedded object in a form. The code is the following one:

Function ReturnSheet(doc As notesdocument) As Variant
Forall o In doc.EmbeddedObjects
If Ucase$(o.Name) = "LOTUSSPREADSHEET1" Then
Set RetornaSheet = o.object
Exit Forall
End If
End Forall
End Function

I tried the internet and I saw the same problem in some postings, but no solution till now. The object (a spreadsheet) is not in a rich text field, and it always exists.

Any help will be welcome

Glombi:
Anstelle von
  Set RetornaSheet = o.object
musst Du
 Set RetornSheet = o.object
schreiben.

Thomas Schulte:
Wohl eher ReturnSheet Glombi oder?

Thomas

Glombi:
Besser ist das  ;D

Wahrscheinlich hat es das mal so eben runtergetippt und ich Depp sehe mir das auch noch an  >:(

Andreas

Marinero Atlántico:

--- Zitat von: StoneCold am 02.11.04 - 14:28:19 ---
If Ucase$(o.Name) = "LOTUSSPREADSHEET1" Then

--- Ende Zitat ---

I think you should try

--- Code: ---If Ucase$(o.Name(0)) = "LOTUSSPREADSHEET1" Then

--- Ende Code ---

Its much easier to find such little bugs if you are using errorhandling.


--- Code: ---Function ReturnSheet(doc As notesdocument) As Variant
On Error goto iHaveVotedRepublicans

Forall o In doc.EmbeddedObjects
If Ucase$(o.Name) = "LOTUSSPREADSHEET1" Then
Set RetornaSheet = o.object
Exit Forall
End If
End Forall
exit function

iHaveVotedRepublicans:
ReturnSheet = false
msgbox |Error in Function Returnsheet | & Error$(Err) & | in line:| & Cstr(Erl)
' or use print
End Function

--- Ende Code ---


---

--- Zitat ---
--- Ende Zitat ---

Navigation

[0] Themen-Index

[#] Nächste Seite

Zur normalen Ansicht wechseln