All Questions
Tagged with basic libreoffice
47
questions
0
votes
1
answer
90
views
How do I get content of a text cursor in Libreoffice Writer?
I want to get content of a text cursor in Libreoffice Writer. In this case, the content of the first word in the document.
I tried the code below. The last line in the sub gets me the content of the ...
0
votes
2
answers
121
views
Unable to change shape color using macro in LibreOffice Impress presentation mode
I'm trying to use Basic macros to make a shape change its color when clicked during presentation mode. My goal is to create versatile code that works on any slide, regardless of the number of shapes.
...
0
votes
1
answer
76
views
A way to add subroutines by code at runtime in libreoffice basic
Is there a way to add / delete subroutines or functions by code at runtime in libreoffice basic?
I would very like to be able to create, delete and run subroutines or functions by code at runtime. I ...
0
votes
1
answer
57
views
creating a new module in a chosen library using libreoffice basic
How can I create a new module in a chosen library using libreoffice basic code?
I've tried:
ThisComponent.getLibraryContainer().getByName("C_calc").getModuleContainer().insertByName("...
1
vote
0
answers
74
views
Libreoffice upgrade (7.5 to 7.6) broke my macro
The macro was working perfectly under 7.5 (7.5.3??) but very frustratingly it's now dead after a Libreoffice 7.6.0.3 upgrade, as are the many(!) instances / slight variants of this code through my ...
0
votes
1
answer
99
views
Accessing SQL array element from Libreoffice Basic with Postgres DB
This is a followup with the discussion at:
Accessing SQL array element from Libreoffice Basic
I have almost the same problem. I am following the above mentioned code, but I get an error. Here is what ...
0
votes
3
answers
554
views
Macro to link checkboxes cell at Lib Calc
Context:
I'm trying to learn excel, for personal and profissional purposes. As I can't afford excel at the moment I'm using Lib Calc which I found very similar. I learnt many things that can be easily ...
1
vote
0
answers
41
views
Can I increase a number by a macro in LibreOffice Impress?
I want to make a counter with Libreoffice Impress.
Each Time I click on a rectangle, the number inside increases.
Dim Doc As Object
Dim Page As Object
Dim Rect As Object
Doc = ThisComponent
Page = ...
1
vote
1
answer
515
views
Inserting and removing text into a textbox on a SHEET in Libreoffice calc BASIC
As I can't solve my problem I'd like to ask someone more experienced.I created simple dialog (4 fields) to let the user enter few data. After clicking "Submit" button those data should be ...
2
votes
2
answers
727
views
LibreOffice Calc Macro - Set two different types of fonts within the same cell
Good morning everyone,
I would like to build a Uno Basic macro that allows us to set the formatting one cell in such a way as to have the content first formatted with one character and then ...
0
votes
0
answers
667
views
Dll for use with Excel VBA and LibreOffice Calc Basic
I have windows 8 and with VS2017 I created a Dll1.dll in c ++ to be used in Excel(VBA) and Libreoffice/Calc (Basic).
The DLL contains a simple function that returns an integer.
I compile the project ...
2
votes
2
answers
1k
views
Macro to store cell value data and retain the value even when cell content changes
I need to permanently store the instantaneous value of some cells, B4 and B5.
My problem is when the cell contents change, so do my stored variables, but I want the variables to retain the values they ...
1
vote
1
answer
2k
views
Libreoffice calc - how to write a same value into a range
I know how to 'select' a range in LO (7.2.4.1) Calc BASIC ....
ThisComponent.CurrentController.ActiveSheet.getCellRangeByName("D1:H6")
But how to write a value, e.g. "1", into ...
1
vote
1
answer
641
views
Libreoffice Calc Basic How to append 2 decimal places by code
Declaration
Dim currDoc As Object
Dim currSheet As Object
Dim cell As Object
currDoc = ThisComponent
currSheet = currDoc.sheets(0)
Logic
cell.Formula = cDbl(cell.Value)
Desired Output
100,00
1
vote
1
answer
373
views
How to use a module in libre office basic?
I'm used to VBA, but I am supposed to debug some libre office basic code, so I tried to write a basic module in the code-behind to address my worksheet.
The thing is, that whenever I try to run the ...