我要将代码从按钮转移到代理,但是当我把它放在我的声明上时:
Dim s As NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim view As NotesView
Dim coll As NotesDocumentCollection
Dim item As NotesItem
Dim Formula As String 'Public symbol is declared in another module: Formula
Dim authors() As Variant 'Public symbol is declared in another module: AUTHORS
Dim authorlist() As Variant
我有Public symbol is declared in another module
我似乎无法找到最新消息,因为它只是一个声明。你能救我一下吗?
答案 0 :(得分:3)
您是否在代理中使用任何脚本库?当您使用已在脚本库中声明的相同变量或函数名称时,会出现此错误。
来自帮助文档:
公共符号在另一个模块中声明:
<name>
声明为Public的名称已被声明为Public 另一个加载模块。名称只能在一个名称中声明为公共名称 一次加载模块。其他加载的模块只能引用它 名。
从声明中删除Public,或更改公共名称 它与已加载的模块中的名称不冲突。
答案 1 :(得分:3)
所以我认为你将它直接粘贴到主源窗口而不是Initialize
部分。
如果是这样,发生的事情是你的变量正在点击保留的关键字。要解决此问题,请更改名称或在方法中声明它们。
示例:
Sub Initialize
Dim s As NotesSession
Dim db As NotesDatabase
Dim doc As NotesDocument
Dim view As NotesView
Dim coll As NotesDocumentCollection
Dim item As NotesItem
Dim Formula As String 'Public symbol is declared in another module: Formula
Dim authors() As Variant 'Public symbol is declared in another module: AUTHORS
Dim authorlist() As Variant
Dim editors() As Variant
End Sub