Skipping over Call Statement

I have a button that runs some existing code which pulls a number of Call statements. These Call statements pull up Subs and Functions from existing items in the Script Library. Everything in the existing items is working as it should.

I have created some new Subs and a Function in an existing Library to run in this button. I have added a new Call statement prior to the first existing Call statement in the code. However, when I click the button, my new Call statement is skipped as if it wasn’t there. It does not return an error.

The first line of my new Sub is:

Sub NewName(doc As NotesDocument, type As String)

My new Call statement is:

Call NewName(doc, type)

The first line of the existing Sub is:

Sub OldName(adb As NotesDatabase, bdb As NotesDatabase, adoc As NotesDocument, _

bdoc As NotesDocument, cdoc As NotesDocument, ddoc As NotesDocument,_

addcodea As String, addcodeb As String)

The first exsiting Call statement is:

Call OldName(db, blankdb, currdoc, blankdoc, blankdoc, blankdoc, “Text”, “More Text”)

To add a little more detail:

All of the necessary libraries are setup to be used in the Document ‘Options’.

The doc and type are dimmed in the button’s code.

I verified and re-verified that the actual name of my Sub is spelled correctly in the new Call Statement.

Any help with this would be great.

Subject: Skipping over Call Statement

Type is a reserved word. You cannot use it as a variable name.

Subject: RE: Skipping over Call Statement

Type is actually a shortened version of the term used in my code. It does begin the word used in production code. Can I not even use it to begin a word?

Thanks.

Subject: RE: Skipping over Call Statement

Yes, this it is fine to use identifier names like “ProductType” or “TypeOfItem”, you just cannot call a variable “Type”.

Subject: RE: Skipping over Call Statement

I have changed the variable name so that it begins with style and it is still skipping over my Call statement. It does not appear that this is my problem.

Subject: Skipping over Call Statement

It doesn’t matter much what you put into a library if you don’t also recompile the code that uses the library. You’re going to have to re-save the form that bears the button (or use the Recompile All LotusScript tool).

Subject: RE: Skipping over Call Statement

and be very carefull that you recompile the libraries in the sequence in which they are used. Thus, if LSLib2 contains the statement “Use LSLib1”, then you must compile LSLib1 first, and so on down the track. Furthermore, simply opening and saving a library is not enough. You should make some change. I ususally put a space on the “Use …” line

For my 2 cents - I never use Recompile All, because it updates the last changed datestamp and signature of every design element, so you lose all track of design origin (especially annoying in templates).