Excel 2010 VBA macros fail in Wine (runtime error '9') - But work in Windows

Questions about Wine on Linux
Locked
di3
Newbie
Newbie
Posts: 1
Joined: Wed Feb 03, 2021 4:02 pm

Excel 2010 VBA macros fail in Wine (runtime error '9') - But work in Windows

Post by di3 »

Hello and thanks for reading!

I've been trying to make Excel 2010 work in Debian 10, because I use an excel file with a VBA program that won't run in LibreOffice.

I can't rewrite/replace the VBA program because I don't have the knowledge.
But since the program works in Windows (other people use this same file regularly) I thought it should run on wine.

THE PROBLEM:
1° Excel opens perfectly.
2° I should get a User Form from which I activate the functions in the macro. But it doesn't work automatically now, I must start the macros manually.
3° As I select a function in the User Form it fails raising this error: "Runtime Error (Error 9) - Subscript Out of Range "
4° I'm given the option to debug the VBA program, which takes me to the VBA editing program.
5° Once in the debugging window, I start to read the highlighted statement in order to find the bug, but after a while the program crashes due to this error:
"-2147417848(80010108) runtime error - Connection to the type library or the object library for remote processes has been lost" [roughly translated from my spanish version]

After this Excel crashes.


*I was hoping there might be a patch or something to improve VBA functionality in Excel. As I know that this macro works perfectly in Windows. Perhaps some modifications need to be made in the VBA macro in order to make it work on wine.

Thank you for any suggestions and support.


What software am I using?

-Wine 6.0 (have both amd64 and i386 architectures available)
**with winbind, wine-mono and gecko (not sure of the gecko name, it was installed when I first ran a "winecfg" command)
-Debian 10
-Excel 2010

What have I done so far?

a. I have created a specific WINEPREFIX with WINEARCH=win32 and installed Excel 2010 there.

b. I have modified the specific WINEPREFIX I use for Excel using "winecfg" setting the version of Windows to XP.

c. I've set the "riched20" library to native, then builtin using winecfg, as suggested in the AppDB.

d. I've searched for bugs or suggestions in bugzilla and in the AppDB, finding nothing new.
User avatar
Bob Wya
Level 12
Level 12
Posts: 3068
Joined: Sat Oct 16, 2010 7:40 pm

Re: Excel 2010 VBA macros fail in Wine (runtime error '9') - But work in Windows

Post by Bob Wya »

@di3

It might be helpful to get a Wine terminal debug log.

See: WineHQ FAQ: 10.1.1 How can I get a debugging log (a.k.a. terminal output)?.

If you post the log in line, please use the terminal Code tags:

Code: Select all

...
and include the command used to launch Wine. The </> button, above the full WineHQ forum edit box, will insert Code tags...

Bob
Locked