【问题标题】:Access vba code is illegal on access 2019访问 vba 代码在 access 2019 上是非法的
【发布时间】:2020-08-31 01:20:04
【问题描述】:

继续这个问题:How to convert 32 bit VBA code into 64 bit VBA code,我写了以下 vba 访问代码:

#If VBA7 Then
        Private Declare PtrSafe Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long 
#Else
        'The folowing line is ilegal in Access 2019:
        Private Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long 
#End If

此代码在 Access 2013 上运行良好,但在 Access 2019 上失败。Else 案例在 2019 年是非法的。 怎么了?

【问题讨论】:

    标签: vba ms-access 32bit-64bit


    【解决方案1】:

    没有错。

    VBA7 对于 Access 2007 及更高版本是 True,因此 Else 部分永远不会在较新的 Access 中运行。

    您需要 Access 2003 或更早版本才能查看 Else 部分。

    【讨论】:

      猜你喜欢
      • 2017-07-04
      • 1970-01-01
      • 1970-01-01
      • 2014-04-09
      • 2015-07-05
      • 1970-01-01
      • 2021-10-06
      • 1970-01-01
      相关资源
      最近更新 更多