Jul 18 2017 09:40 AM
The windows API call AllocConsole no longer seems to work in VBA Access 2016 on Windows 10.
It functions correctly on Windows 7 with Access 2016 and I've been googling for the past few days tring to find an answer. The code is a follows...
Private Declare Function AllocConsole Lib "kernel32" () As Long
Function main_loop()
AllocConsole
Do
DoEvents
'do other stuff
Loop While True
End Function
AllocConsole always return 0 on windows 10.
Running Access as an Administrator and enabing macros and adding trust centre setting etc have no effect.
Is there a work around to get a console window to open?
Thanks
Rob
Jul 31 2018 10:01 PM
I have a similar problem in my C# windows app where I allocate a console window. The console window shows, but the output stream and tracing no longer works on windows 10.
Have you found a solution to your problem?
Aug 03 2018 06:39 AM
This may be a long shot, but have you verified that this API is actually available on the Windows 10 computer?
Aug 03 2018 11:03 AM
SolutionI found a work around by using Access 2013 on Windows 10. The AllocConsole function then works!
Aug 03 2018 11:03 AM
SolutionI found a work around by using Access 2013 on Windows 10. The AllocConsole function then works!