Solved: calc sub syntax error expected =

This sub:

sub setColWidth(aCol as integer, width as single)
	' column width (in 100ths of mm)
	Dim oDoc As Object
	oDoc = ThisComponent
	Dim oSheet As Object
	oSheet = thisComponent.getSheets.getByName( ETF_currentSheet )	
	Dim oColumn As Object
	oColumn = oSheet.getColumns.getByIndex( aCol )
	oColumn.setPropertyValue("Width", width)
end sub

called like this:

sub sample()
Dim oDoc As Object
oDoc = ThisComponent
Dim oSheet As Object
oSheet = ThisComponent.getCurrentController.getActiveSheet
Dim aCol as integer
aCol = lastCol - lastPriceOffset - 1
setColWidth (aCol, 0.75)	'	Basic syntax error: expected '='
End Sub 

This error occurs at compile time before even the first step into the sub ‘sample’,
pointing immediately to the setColWidth() call.

Suggestions?

Thanks,
Mike

[Edit - Opaque] Removed <pre> tags for readability of non-code text

Thank you.
It looks to me as if you did more than remove the

 tags.
I’d like to know what.
I have another post: “In calc, how do I set conditional fomat to say if cell value less than RC[1] then use red text in a macro.” the bottom half of which is trashed and I have no idea why. I’ve tried 3 times to fix it with no luck.
Will you try fixing it?
Thanks,
Mike

There must have happened something strange, probably when copying the code.
No syntaxt error!
Slightly strange style.

A functional erro: Column.Width is shown in an everyday unit (cm in SI locales) on the surface (UI). The actually used unit is 1mm/100 (10µm) however, and this unit must be used when working with the API (0.75 cm = 750* 10µm e.g.).

In my case removing the parentheses around the setColWidth (aCol, 0.75)
in the sample() sub got rid of the syntax error.
That didn't make the routine do what I want but it's a step in the right direction.
Changing the width to 'width = 0.75 * 2540' didn't help, nor did trying to set as 
Selection.Column.Width as Lupp seemed to be suggesting. 
The latter results in Basic runtime error:91 'object variable not set'.
The initial problem is solved, though I must admit when parens are required 
and when they are a show stopper is not clear to me.
Be well,
Mike

Calling a routine needing to get passed parameters without parameters is not a “step in the right direction”.
You didn’t tell what version of LibreOffice you used. But there may be a version not accepting the space between the name of the routine and the opening parenthese of the parameter list.
The right steps would be to read about the basics concerning Basic and the LibreOffice API.
Very useful, but probably a bit steep:

This works for me (extremely reduced version without dispensable lines and pirouettes; emphasizing what happens):

Sub setColWidthInActiveSheet(pColumnIndex As Long, pWidth As Long)
oDoc = ThisComponent
oSheet = thisComponent.CurrentController.ActiveSheet
oColumn = oSheet.Columns(pColumnIndex)
oColumn.Width = pWidth
End Sub

Sub caller()
setColWidthInActiveSheet(3, 750)
End Sub
"step in the right direction" or not is a matter of perspective.
From my point of view the error was keeping me from being able to do anything. I had many other macro/subs that worked as I wished but could not run them with that error in place.
Here's another case like the previous that's got me stymied:

OPtion VBASupport 1
Sub Main
End Sub

Public StocksOds as Object
Public ETFsSheet as Object

sub boo()
	dim c as Long, r as Long
	c=2
	r=7
	cells(r,c).value=456.654
	setThisCompSheet
	setCellStyle( r - 1, c - 1, "red1" )	        '	Basic syntax error: expected =
end sub
sub setThisCompSheet()
	'	StocksOds & ETFsSheet are public Object
	StocksOds = ThisComponent
	ETFsSheet = StocksOds.CurrentController.ActiveSheet
end sub
sub setCellStyle( cRow as Long, cCol as Long, cStyle as string )
	c=ETFsSheet.getCellByPosition(cCol,cRow)	' (C,R) zero based
	StocksOds.CurrentController.Select(c)
	c.CellStyle = cStyle
end sub

This gives the same error in a new empty sheet.
Ideas?
Mike