在VBA中的dll中使用函数时出现运行时错误48?

时间:2018-09-05 12:13:43

标签: vba dll coreldraw

我必须在VBA代码中使用DLL文件。

在代码中声明后,我将无法使用或调用该函数。错误为:file not found,错误代码为runtime 48

我需要的帮助是知道dll中的函数将如何被调用和初始化。

Option Explicit

Public x As Integer

Private Declare Function XYZ Lib " H:\google drive\laser machine\software\Development\delete\squareDLL\x64\Debug\squareDLL.dll" (ByVal x As Double) As Double

Sub main()
    x = 20
    Call XYZ(x)
End Sub

1 个答案:

答案 0 :(得分:0)

Option Explicit
Public x As Integer
Private Declare Function XYZ Lib " H:\google drive\laser machine\software\Development\delete\squareDLL\x64\Debug\squareDLL.dll" (ByVal x As Double) As Double

Sub main()
x = 20
Call XYZ(x)
End Sub
相关问题