Skip to main content

All Questions

Tagged with
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 ...
Jan Siebert's user avatar
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. ...
Alex Hubbe's user avatar
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 ...
mutercim's user avatar
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("...
mutercim's user avatar
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 ...
Micklos's user avatar
  • 137
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 ...
Z T Minhas's user avatar
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 ...
Hid's user avatar
  • 5
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 = ...
Bob La Touffe's user avatar
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 ...
Marcin's user avatar
  • 11
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 ...
Tonky75's user avatar
  • 132
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 ...
MAX_1999's user avatar
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 ...
Micklos's user avatar
  • 137
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 ...
Micklos's user avatar
  • 137
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
Tobi S's user avatar
  • 161
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 ...
TorbenIT's user avatar
  • 292

15 30 50 per page