Uncheck Tools → Cell Contents → AutoInput (via macro)

Is It possible uncheck (via macro) the Autoinput (Tools->Cell Contents → Autoinput)?
Observation: It is NOT autocomplete. It is NOT like this…
(oGSheetSettings =CreateUnoService(“com.sun.star.sheet.GlobalSheetSettings”)
oGSheetSettings.DoAutoComplete = False)
Thanks for attention.

It MUST be like this. Wrote a bug #tdf144308 - I hope for a quick fix.
Thank you for your persistence!

However, judging by the observations, this is the same thing. You have found a solution. A leapfrog with names. There is such a thing…

Even Unchecking AutoComplete, the calc keeps on suggesting the filling…That is giving me a headache.
For example, I type “10” and the macro code will complete with & “/” & format(now,“MMM”) & “/” & format(now, “YYYY”) …when I type “10”, the calc suggests “/set/2021”. If I hit enter, it occurs a error…I DON´T WANT THAT AUTOCOMPLETE FOR GOD’S SAKE.

Temporarily, I can solve this problem with the macro code “if oActiveCell.Value = oActiveCell.String then”…
If anyone has any solution, anything, I will be happy to listen it.

Hello! If you are talking about auto-completion of macro code, then this is configured through Options / LibreOffice / Basic IDE. If there is no such section in Options, then go to the Advanced section and enable the option “Enable experimental features …”

No, No. It has nothing to do with autocomplete of macro…It has to do with autocomplete of cell content…I want to make typing easier for my work colleagues. When They type the day and They move to next cell, the macro code has to fill the cell with month and year. For example, He types “10” and he moves to next cell. That cell would be “10/set/2021”. This macro code is in Content changed of the spreadsheet.

If you want to simplify entering dates, then maybe you should look here:


After all, it’s easy to enter (today’s date):
4/9/
and go to the next cell.

Edit:
If you add a template as
D/
e.g. D.M.Y;D.M.;D/M/;Y.M.D;D/
it will be enough to enter the day, and the month and year will be taken as the current one. The macro is not needed.

My work colleagues know nothing about “go to that menu”, “go to this option”. I want to do EVERYTHING with macro and I just want to delivery the spreadsheet to They open it e use it… Indeed I have already done it…with Excel macro.

Maybe you should try to change the specified property (above mentioned)?
And then, educating colleagues is not the worst way. In their own interests.

Sometimes Calc crashes…

Many of my work colleagues are old…They don´t have patiente with programs and computers. I love programming and That is a hobby for me.

If something can be done without a macro, then it should be done. But anything is possible…Only then we will have to break the well-known principles: KISS & Occam’s razor. More things should not be used than are necessary.


It is necessary to work with the active cell. Here’s a simple macro for this purpose (thanks to @Villeroy).

Function ActiveCell(Optional oView As Object)
	ActiveCell = GetActiveCell(oView)
End Function
Function GetActiveCell(Optional oView As Object)
	Dim arr$(), nSheet&, sInfo$, nCol&, nRow&, bErr As Boolean

	If IsMissing(oView) Then oView = ThisComponent.CurrentController
	If  Not oView.SupportsService("com.sun.star.sheet.SpreadsheetView") Then
		Exit Function
	End If
Rem	XRay oView.ViewData
	arr() = Split(oView.ViewData, ";")

	nSheet = CLng(arr(1))
	sInfo = arr(nSheet + 3)
	arr() = Split(sInfo, "/")
	On Error GoTo ErrSlash  'InStr(sInfo, "/") = 0
		nCol = CLng(arr(0))
		nRow = CLng(arr(1))
	On Error GoTo 0
	GetActiveCell = oView.Model.Sheets(nSheet).getcellByPosition(nCol, nRow)
	Exit Function

ErrSlash:
	' When the number of rows is greater than or equal to 8192,
	' "+" is used as a separator instead of "/". An error occurs.
	If Not bErr Then  'slash not found
		bErr = True
		arr() = Split(sInfo, "+")
		Resume
	End If
End Function

Yes…I agree with you. But as I said above…I could find the “if oActiveCell.Value = oActiveCell.String then" solution for now…But I appreciate your attention…Thanks a lot.

There is no concept of an “active cell” in LO Calc. The macro above solves this problem.