I first tried in version 7x
I went to “stable” version
Version: 126.96.36.199 (x64)
Build ID: 639b8ac485750d5696d7590a72ef1b496725cfb5
CPU threads: 4; OS: Windows 10.0 Build 19041; UI render: GL; VCL: win;
Locale: en-US (en_US); UI-Language: en-US
I am new to LibreOffice , and used excel vba before
I’m trying to learn this office replacement as I do not like the MS subscription model $$
If I do a subroutine
sub ClearField ThisComponent.Sheets(0).GetCellRangeByName("D9:J24").ClearContents(7) End sub
And use menu tolls marco run — it works everytime however…
I have also a Function that is where I need the clearcontents to do it’s thing
The function get data from a mysql table doing some math and put results in cells in range.
Then function on it’s on works just fine for getting and displaying the data.
but if I add the line to clearcontents
in the function , it does not clear anything (oh, the cells contain strings and doubles)
If I try to call the subroutine from the function it does not work:
Call ClearField or
I have placed breakpoints in code and added
MsgBox for debugging, but can not find the error of my ways
I spent a couple of days with ver 7.x latest and then deleted and tried stable. Same results.
Just trying to learn stuff and keep this old brain working
(Slightly edited for better readabilty by @Lupp .)