Excel Macro 32bit to 64bit issues

rholbrook

Well-Known Member
Location
Kaysville, Ut
I have an Excel Macro that is not liking the 32bit to 64bit conversion. I get an error loading my personal worksheet

Compile Error:
The code in this project must be updated for use on 64-bit systems. Please review and update Declare statements and then mark them with the PtrSafe attribute.

Help....What do I need to change? This is where it is going to after I except the error.

Option Explicit
Option Compare Text

Const EXPORT_DIRECTORY As String = "C:\PORCHRAIL2MAS\"
Const EXPORT_NAME As String = "PORCHRAILIMPORT.CSV"

Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)


I did find this statement in a GENERAL module

#If VBA7 Then
Private Declare PtrSafe Sub Sleep Lib "kernel32" (ByVal ms As LongPtr)
#Else
Private Declare Sub Sleep Lib "kernel32" (ByVal ms As Long)
#End If


Thank You in advance
 
Top