Bug 157946 - VBA SendKeys not implemented (?)
Summary: VBA SendKeys not implemented (?)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Macro-VBA
  Show dependency treegraph
 
Reported: 2023-10-27 13:25 UTC by hugofernando
Modified: 2023-11-02 18:54 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
file with macro (2.49 MB, application/vnd.ms-excel.sheet.macroEnabled.12)
2023-10-27 13:25 UTC, hugofernando
Details

Note You need to log in before you can comment on or make changes to this bug.
Description hugofernando 2023-10-27 13:25:19 UTC
Created attachment 190452 [details]
file with macro

Hi,

I am getting an issue trying to run macros from the file attached. It seems this Macro is trying to execute a code that was not implemented in LO yet.
Comment 1 BogdanB 2023-10-27 13:37:27 UTC
Have this macro worked with some old version of LibreOffice?
Comment 2 hugofernando 2023-10-27 20:49:56 UTC
I do not know if this macro had worked in previous versions of LO.
Comment 3 Stéphane Guillou (stragu) 2023-10-27 21:55:39 UTC
Which version of LibreOffice are you using? Please test with a recent version and paste here the version information copied from Help > About LibreOffice.
Thank you.
Comment 4 hugofernando 2023-10-27 21:56:35 UTC
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 56f7684011345957bbf33a7ee678afaf4d2ba333
CPU threads: 24; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: pt-BR (pt_BR); UI: pt-BR
Calc: threaded
Comment 5 QA Administrators 2023-10-28 03:13:45 UTC Comment hidden (obsolete)
Comment 6 Stéphane Guillou (stragu) 2023-10-28 07:37:12 UTC
I get:

BASIC runtime error.
'323'
Module cannot be loaded; invalid format.

... on line 13:

   Set oshell = CreateObject("wscript.shell")

And then another runtime error '1' ("the procedure doesn't exist") on line 257:

   Application.OnKey "{ESC}", "Form_Click" 'fecha form

But I assume this is related to me running it on Linux instead of Windows.

Same in 6.1.0.3 and 7.6.2.1.

What errors do you see, at what lines?
Comment 7 hugofernando 2023-10-28 19:07:32 UTC
I get the following (I am translating the error messages from Portuguese):

- Error in executing BASIC on line '73' Not implemented
- Error in executing BASIC '1' An exception happened. Type: con.sun.star.uno.RuntimeException Message: The procedure doesn't exist
Comment 8 QA Administrators 2023-10-29 03:13:49 UTC Comment hidden (obsolete)
Comment 9 Buovjaga 2023-11-02 18:54:45 UTC
Reproduced on Windows. The first error points to SendKeys.

https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/sendkeys-statement

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c0c8cffd3541e3cd616c96791b04e7ebf2b2ed03
CPU threads: 2; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_FI); UI: en-US
Calc: threaded