View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
John[_143_] John[_143_] is offline
external usenet poster
 
Posts: 13
Default Using 32 bit VBA in Excel 2007

I have just upgraded to Win 7 AND Excel 2007. Some of my old code runs as
expected in 2007, but any code that uses 32 bit API does not behave. A
sample of the code (from J. Walkenbach's book) is provided below. Any quick
advice ?

Thanks, John


'32-bit API declarations
Declare Function SHGetPathFromIDList Lib "shell32.dll" _
Alias "SHGetPathFromIDListA" (ByVal pidl As Long, ByVal pszPath As String)
As Long

Declare Function SHBrowseForFolder Lib "shell32.dll" _
Alias "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) As Long

Public Type BROWSEINFO
hOwner As Long
pidlRoot As Long
pszDisplayName As String
lpszTitle As String
ulFlags As Long
lpfn As Long
lParam As Long
iImage As Long
End Type