Calc BASIC Synax Error

I’ve been working with a spreadsheet for several months with no issues. I am now receiving this Error message when I attempt to paste .csv data into the sheet. Their are 30+ sheets and only one gives this error. I’ve tried to create another sheet in hopes of deleting the other one but the error comes up on the other as well. I’m new to the forum and not sure if the picture will show. All help is appreciated.


Steve

Only the empty

Sub main 

End

has a closely regular syntax in your “code list”

The regular syntax:

Sub main 
 REM write your commands here...

End Sub

Whar you want to achieve?

I’m wanting to achieve a working spreadsheet without this error. I have 30 spreadsheets and only one produces this error even as each subsequent sheet was copied from the original, which still works.

We can’t see your sheet. (There should be an upload button, when you edit.)
.
We don’t know why a macro is called in your sheet(s)
.
We can see some calculations? This reminds me more on something copied from C-language, than working BASIC-Code, but ok - it is your code…
.
Shall your log5function shall define a function or call this?
What happens, if you remove the { } ?