Lesson 12 pulling the code gives the me same error going from 32 bit to 64. I am using Windows 10 and Access 2019/365 and I don't see any updated instructions that make any sense for this. Can you help me?
#If VBA7 Then 'use PtrSafe
Private Declare PtrSafe Function GetOpenFileName Lib "comdlg32.dll" Alias _
"GetOpenFileNameA" (pOpenfilename As OpenFilename) As Long
#ElseIf Win64 Then 'need datatype LongPtr
Private Declare PtrSafe Function GetOpenFileName Lib "comdlg32.dll" Alias _
"GetOpenFileNameA" (pOpenfilename As OpenFilename) As LongPtr
#Else '32-bit Office
Private Declare Function GetOpenFileName Lib "comdlg32.dll" Alias _
"GetOpenFileNameA" (pOpenfilename As OpenFilename) As Long
#End If
Just replace the Private Declare Function line at the top with this block of code.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Imaging Seminar.