Asked by:
Problems with the vba array() function after Windows august update

Question
-
Problems with vba array() function after windows update
Using Multivalue combobox on a form
The following statement to clear all the selections :
me.cmbMultivalue=Array()
This has worked for years, but after the latest windows update, we are getting the following Visual Basic error:
Run-time error '-2147352567(80020009)'
There isn't enough memory to perform this operation. Close unneeded programs and try the operation again.
All replies
-
Hi Web
I found some older information on your run-time error:
https://stackoverflow.com/questions/41718872/access-run-time-error-2147352567-80020009-subform
https://www.access-programmers.co.uk/forums/showthread.php?t=293137
Cheers // Peter Forss Stockholm
-
Microsoft has acknowledged that all Windows cumulative updates released on August 13, 2019 cause problems with VB/VBA. The problems appear to have to do with empty arrays.
Microsoft is working on a fix; let's hope it will be released soon
Regards, Hans Vogelaar (http://www.eileenslounge.com)
-
-
-
-
-
-
-
Microsoft released a fix (kb4512494) today that is supposed to address recently created VBA bugs, refer to https://support.microsoft.com/en-us/help/4512494/windows-10-update-kb4512494
Daniel Pineault, 2010-2019 Microsoft MVP
Professional Support: http://www.cardaconsultants.com
MS Access Tips and Code Samples: http://www.devhut.net- Edited by Daniel Pineault (MVP)MVP Saturday, August 17, 2019 12:04 AM
- Proposed as answer by Gustav BrockMVP Saturday, August 17, 2019 11:40 AM
-
Here's the current (UPDATE: 2019-09-12) state regarding this bug, summarized from the information available on the various KB pages:
- Windows 10 (1903): Fixed with KB4512941 (which, in turn, causes Cortana issues that have been fixed in KB4515384).
- Windows 10 (1809) and Windows Server 2019: Fixed with KB4512534.
- Windows 10 (1803): Fixed with KB4512509.
- Windows 10 (1709): Fixed with KB4512494.
- Windows 10 (1703): Fixed with KB4512474.
- Windows 10 (1607) and Windows Server 2016: Fixed with KB4512495.
- Windows 8.1 and Windows Server 2012 R2: Fixed with KB4517298.
- Windows Server 2012: Fixed with KB4517302.
- Windows 7 and Windows Server 2008 R2: Fixed with KB4517297.
We have (so far) tested the fix for Windows 8.1, Windows 10 1809 and Windows 10 1903, and it worked for us. Here is a minimal repro example of the issue that we faced:
Private v2 As Variant Sub t() Dim v1 As Variant v1 = Array() v2 = v1 ' Invalid procedure call End Sub
Note: Some of the fixes listed above are not available on Windows Update yet but can be downloaded in the Update Catalog.
Best regards
Heinzi- Edited by Heinzi.at Thursday, September 12, 2019 3:54 PM
-
An interesting test I did with Access 2000. Win 7 32bit.
ComboBox - Me.ComboBox1 bound Control Source to "=Array()" - still works.
Textbox - Me.Textbox1 bound Control Source to "=Array()" - Crash Access.
The solution I guess would be to avoid blanks or Nulls in Arrays.
This will work
V1 = Array(Null)
V2 = V1
- Edited by AccessVandal Thursday, August 22, 2019 5:48 AM add
-
The bug fix is out with KB4512941, and it works for me. I got it via Windows Update.
https://support.microsoft.com/en-us/help/4512941/windows-10-update-kb4512941
Matthias Kläy, Kläy Computing AG
-
Users of Windows 10 v1903 should be aware that KB4512941 causes problems on many computers - see https://borncity.com/win/2019/08/30/windows-10-v1903-update-kb4512941-workaround-for-the-cortana-high-cpu-load-issue/
Regards, Hans Vogelaar (http://www.eileenslounge.com)
-
If I read this blog post correctly, it is about a Beta version of KB4512941 discussing one problem (a 100% CPU condition with Cortana). The Windows 10 build number mentioned in the blog is 18362.327. The released version from Windows Update brings the Windows version to 18362.329. I cannot comment on the Cortana issue because I don't use Cortana, but otherwise I have so far not experienced any problems with this update.
Matthias Kläy, Kläy Computing AG
-
-
This will work in VBA/VB6:
Public Declare Function VariantArray Lib "oleaut32" Alias "SafeArrayCreateVector" (Optional ByVal vt As VbVarType = vbVariant, Optional ByVal lLow As Long = 0, Optional ByVal lCount As Long = 0) As Variant()
MyVar = VariantArray()
-
-
-