自定义函数JSAREGISTER用于在JSA中注册自定义函数
function JSAREGISTER(module_text_or_file_text,procedure_or_resource,type_text,function_text,argument_text,macro_type,category,shortcut_text,help_topic,function_help,argument_help){ //注册函数
//名称范围外:注册可调,未注册不可调,均无果。
Application.ExecuteExcel4Macro('REGISTER("' +
module_text_or_file_text + '","' + //引用user32.dll例如:"C:\\Windows\\System32\\user32.dll"
procedure_or_resource + '","' + //引用user32.dll的内部函数名例如:"CharPrevA"
type_text + '","' + //返回值的数据类型,参数的数据类型。(1+参数个数)个P。例如:"PP"
function_text + '","' + //函数名。例如:"MCLUJING"
argument_text + '",' + //参数名。参数名之间用","分隔。例如:"参数名1,参数名2"
macro_type + ',"' + //宏类型。例如:1
category + '","' + //函数类别。例如:"用户定义"
shortcut_text + '","' + //快捷键。例如:undefined
help_topic + '","' + //帮助文件的引用。例如:undefined
function_help + '",' + //函数说明。例如:"函数说明"
argument_help + //参数说明。参数说明之间用","分隔。例如:'"参数1说明","参数2说明"'
')');
}