Asi
06-05-2011, 11:50 PM
Hi
I have an excel file that contains macro and is distributed to many stations and runs successfuly.
The code contains many Declare statements as the following:
Declare Function FindFirstFile Lib "kernel32" Alias _ "FindFirstFileA" (ByVal lpFileName As String, lpFindFileData _ As WIN32_FIND_DATA) As Long
Declare Function FindNextFile Lib "kernel32" Alias "FindNextFileA" _
(ByVal hFindFile As Long, lpFindFileData As WIN32_FIND_DATA) As Long
...
On 1 station, the following message occured: "The code in this project must be updated for use in 64-bit systems. Please review and update Declare statements and then mark them with the PtrSafe attribute."
My questions are as follows:
Is this problem because the windows OS is 64-bit system or because Office is 64-bit version ?
Is there something I can do as a workaround on the stations that get this message or do I need to change my code ?
If changing the code is a must, can you give me an example of how to do that based on the example I mentioned above ?
Are there any other parts of the code that I need to check in order to make it compatible with 64-bit systems or only the Declare Statements ? Thanks
Asi
I have an excel file that contains macro and is distributed to many stations and runs successfuly.
The code contains many Declare statements as the following:
Declare Function FindFirstFile Lib "kernel32" Alias _ "FindFirstFileA" (ByVal lpFileName As String, lpFindFileData _ As WIN32_FIND_DATA) As Long
Declare Function FindNextFile Lib "kernel32" Alias "FindNextFileA" _
(ByVal hFindFile As Long, lpFindFileData As WIN32_FIND_DATA) As Long
...
On 1 station, the following message occured: "The code in this project must be updated for use in 64-bit systems. Please review and update Declare statements and then mark them with the PtrSafe attribute."
My questions are as follows:
Is this problem because the windows OS is 64-bit system or because Office is 64-bit version ?
Is there something I can do as a workaround on the stations that get this message or do I need to change my code ?
If changing the code is a must, can you give me an example of how to do that based on the example I mentioned above ?
Are there any other parts of the code that I need to check in order to make it compatible with 64-bit systems or only the Declare Statements ? Thanks
Asi