Native 64-bit processes in Office 2010 cannot load 32-bit binaries. This includes the common controls of MSComCtl (TabStrip, Toolbar, StatusBar, ProgressBar, TreeView, ListViews, ImageList, Slider, ImageComboBox) and the controls of MSComCt2 (Animation, UpDown, MonthView, DateTimePicker, FlatScrollBar).These controls were installed by previous versions of Microsoft Office and are installed by 32-bit Office 2010. An alternative must be found for existing Microsoft Office VBA solutions that utilize these controls when the code is migrated to 64-bit Office 2010. 64-bit Office 2010 does not provide 64-bit versions of the Common Controls.
I can't install the productI don't understand which product can't you install?
#If VBA7 Then
'* 64-bit declarations, which will work in Access 2010 and later, 32 and 64-bit versions
Private Declare PtrSafe Function GetTextMetrics Lib "gdi32" Alias "GetTextMetricsA" (ByVal hDC As LongPtr, lpMetrics As TEXTMETRIC) As Long
Dim mhDC As LongPtr
#Else
'* 32-bit declarations for 32-bit versions of Access before Access 2010
Private Declare Function GetTextMetrics Lib "gdi32" Alias "GetTextMetricsA" (ByVal hDC As Long, lpMetrics As TEXTMETRIC) As Long
Dim mhDC As Long
#End If
lngret = GetTextMetrics(mhDC, tmTEXTMETRIC)
If your application uses 32 bit ocx's you will have to replace them with the 64 bit version (if they exist, if not you're out of luck).
As far as the api calls are concerned, you can use what's called conditional compiling which will enable using the same code on both 32 and 64 bit machines. Here is a sample:
Open in new window