Excel in the 21st Century - 64-bits of everything has me stumped

hicksi

Board Regular
Joined
Mar 5, 2012
Messages
168
Oh JOY. My laptop, which had served me faithfully for years, dropped its' Hard Drive. Yes, IT was running 64-bit, but I suspect my Office wasn't.
Anyway, I got this brand-spanking-new toy, 64-bit operating system, and then 'persuaded' a local dealer to sell me a single-user/single-payment copy of Office 2019 PRO. Like, everything, Outlook included!!!
But then came the crunch. It's ALSO 64-bit, and right now I'm not even sure if I'm licensed in that, or somehow still connected to Office 365 (that pay-by-the-year-forever version).

And LO, all my Excel Workbooks crashed (once I had recovered them from Backup, that is).

I have overcome the conditional compile problem (partially) so those old calls to user32 and its fellows now has the ptrsafe option. At least that compiles.
BUT (here comes the questions):

1: I saw a bit of code on a page I was reading where some TYPE-constructs also needed differences (long vs longptr). Is there a document/page somewhere that describes what and why this is, and more particularly lists those types that need to also be conditional-compiled?
The code I saw was on the page Compatibility between the 32-bit and 64-bit versions of Office
and a snippet of the code involved BROWSEINFO:
VBA Code:
Declare Function SHBrowseForFolder Lib "shell32.dll" _
  Alias "SHBrowseForFolderA" (lpBrowseInfo As BROWSEINFO) As Long
Public Type BROWSEINFO
hOwner As Long
pidlRoot As Long

2: Good old DTPicker is no more. But my users love it... They love to know that 14th February is a Tuesday, and they hate when the form doesn't properly validate a date and a calculation goes awry
I have been able to create a popup calendar form that seems to be working (including being able to clear a date, which has always been a difficult form-based operation).
Moderator, I'll be happy to turn this into a demo if you can tell me where to post it

3: MSCOMCTL.OCX. And probably others that I haven't uncovered as yet. It 'appears' that the UserForms are somehow coping with this anomaly. but in Development mode, it's REALLY BUGGING ME.
I have an ImageList full of icons (16x16 images) that change depending on the condition of the data or enablement of sections of the form. They are changing as expected when running, but the 'Custom Properties' when developing raises the following error:
1610110225517.png

From Project References, it shows that Microsoft Windows Common Controls 6.0 is in C:\Windows\System32\MSCOMCTL.OCX.
Which was a problem as the installed version is in SysWOW64.
HOW do I move it and register it (if I need to/should do)?
or HOW do I get Excel to go find the one in SysWOW64?

And just to make this all-too-complex, the workbooks that I create may be placed on computers running an older Excel version than 2019 and may still be running 32-bit Excel. So any solution needs to be downward-compatible
 

Some videos you may like

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

RoryA

MrExcel MVP, Moderator
Joined
May 2, 2008
Messages
36,150
Office Version
  1. 365
  2. 2019
  3. 2016
  4. 2010
Platform
  1. Windows
  2. MacOS
This is worth a read: Excel: Declaring API functions in 64 bit Office (jkp-ads.com)

The linked API file covers the majority of things you are likely to use.

To the best of my knowledge, the common controls (either version) are just not properly 64bit compatible so I would recommend not using them. They're not installed on all machines anyway, so you'll likely run into issues even without the bitness problem. As far as that latter point goes, you need to use conditional compilation religiously if you need to support multiple versions. It's a bit of a pain (although less hassle than Windows vs Mac in my opinion), but there is no getting away from it.
 

Watch MrExcel Video

Forum statistics

Threads
1,123,206
Messages
5,600,317
Members
414,376
Latest member
NickYOW

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
Top