'以下程序调试通过:
'调用前加载宏文件已被打开,并保证是启用宏状态;
'否则,Excel将提示1004错误:对象或应用程序错误.
Sub main()
Dim nRetx As Long
Dim str1 As String
str1="***"
'格式:Application.Run("宏文件名!函数名","参数一","参数二")
'最多可有30个参数.函数名也可以是子程序名
nRetx = Application.Run("test.xla!getid",str1)
End Sub
'调用前加载宏文件已被打开,并保证是启用宏状态;
'否则,Excel将提示1004错误:对象或应用程序错误.
Sub main()
Dim nRetx As Long
Dim str1 As String
str1="***"
'格式:Application.Run("宏文件名!函数名","参数一","参数二")
'最多可有30个参数.函数名也可以是子程序名
nRetx = Application.Run("test.xla!getid",str1)
End Sub
'调用前加载宏文件已被打开,并保证是启用宏状态;
'否则,Excel将提示1004错误:对象或应用程序错误.
Sub main()
Dim nRetx As Long
Dim str1 As String
str1="***"
'格式:Application.Run("宏文件名!函数名","参数一","参数二")
'最多可有30个参数.函数名也可以是子程序名
nRetx = Application.Run("test.xla!getid",str1)
End Sub