update to 64 bit

dennisli518

New Member
Joined
Feb 10, 2006
Messages
12
Good afternoon,
I have an old code running under 32 bit. But now my computer was updated to 64 bit.
When running the following code, I got a message to ask to update the code to 64 bit and mark them with PtrSafe attribute.
How can I change it?
Sincerely.
DL


[/'Private Declare Function SHBrowseForFolder Lib "Shell32.dll" (bBrowse As BrowseInfo) As Long]
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Here's an example of where the PtrSafe keyword gets inserted for API calls:
Code:
Public Declare [COLOR=#b22222]PtrSafe [/COLOR]Function SHGetSpecialFolderLocation Lib "shell32.dll" _
(ByVal hwndOwner As Long, ByVal nFolder As Long, pidl As Long) As Long

Does that help?
 
Upvote 0
Thank you, Ron,
I insert PtrSave in the code. But the file just always closed out.
I will link the original paste to you later.
DL


[Private Declare PtrSafe Function SHBrowseForFolder Lib "Shell32.dll" (bBrowse As BrowseInfo) As Long]
 
Upvote 0
Ron,
Got it. thank you so much.

[/Private Declare PtrSafe Function SHBrowseForFolder Lib "Shell32.dll" (bBrowse As BrowseInfo) As LongPtr]
 
Upvote 0

Forum statistics

Threads
1,223,896
Messages
6,175,265
Members
452,627
Latest member
KitkatToby

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top