ercedwards
Board Regular
- Joined
- Apr 27, 2013
- Messages
- 125
I have an Excel application written in Excel 2010 64 Bit.
Everything has run fine for months but I needed to add a Chdir command and ran into a problem.
I added in a
Private Declare PtrSafe Function SetCurrentDirectoryA Lib "kernel32" (ByVal lpPathName As String) As Long
to my code and everything is back to running fine again on the 64 Bit version. For users with 32 Bit I have a version of the Workbook without the Ptrsafe.
Do I really need two versions of this workbook, one for 32 Bit and one for 64 Bit or is there a way to alter the declare if I can find which version of VBA the user is running?
Thanks
Everything has run fine for months but I needed to add a Chdir command and ran into a problem.
I added in a
Private Declare PtrSafe Function SetCurrentDirectoryA Lib "kernel32" (ByVal lpPathName As String) As Long
to my code and everything is back to running fine again on the 64 Bit version. For users with 32 Bit I have a version of the Workbook without the Ptrsafe.
Do I really need two versions of this workbook, one for 32 Bit and one for 64 Bit or is there a way to alter the declare if I can find which version of VBA the user is running?
Thanks