solidworks中运行VBA宏时说代码要升级到64位
DeclareFunctionGetOpenFileNameLib"comdlg32.dll"Alias"GetOpenFileNameA"(pOpenfilenameA...
Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long有一个VBA的程序,程序的目的是调用txt文件再进行操作,开头是这句话,请问这句话是什么意思?
运行时跳出上面的窗口,我的系统是64位,solidworks是64位的。请问上面这句话怎么改写成适用于64位的代码?
谢谢! 展开
运行时跳出上面的窗口,我的系统是64位,solidworks是64位的。请问上面这句话怎么改写成适用于64位的代码?
谢谢! 展开
展开全部
Public Declare PtrSafe Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
为了保持向下兼容,还可以使用条件编译:
#If VBA7 Then
Public Declare PtrSafe Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
#Else
Public Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long
#End If
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询