Basic syntax error. "Function not allowed within a procedure

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
Radmo
Posts: 1
Joined: Sun Jun 30, 2019 7:05 pm

Basic syntax error. "Function not allowed within a procedure

Post by Radmo »

I get this: Basic syntax error. "Function not allowed within a procedure." in a modal dialogue box and clicking ok just brings it back. I effectively locked out of my spreadsheet by a procedure that was partially written (still being coded). Why was there a decision to report errors like this? a console may have been enough to prevent the error reporting landing in an infinite loop that the owner of the spreadsheet cannot deal with?
I am puzzled???
Last edited by MrProgrammer on Fri Aug 02, 2019 6:13 pm, edited 1 time in total.
Reason: Moved topic from Calc forum to OpenOffice Basic, Python, BeanShell, JavaScript
Libreoffice 6.0.4.2 (x64)
windows 8.1
User avatar
Zizi64
Volunteer
Posts: 11362
Joined: Wed May 26, 2010 7:55 am
Location: Budapest, Hungary

Re: Basic syntax error. "Function not allowed within a proce

Post by Zizi64 »

Please upload your ODF type sample file and the macro code here.
Tibor Kovacs, Hungary; LO7.5.8 /Win7-10 x64Prof.
PortableApps/winPenPack: LO3.3.0-7.6.2;AOO4.1.14
Please, edit the initial post in the topic: add the word [Solved] at the beginning of the subject line - if your problem has been solved.
User avatar
MrProgrammer
Moderator
Posts: 4908
Joined: Fri Jun 04, 2010 7:57 pm
Location: Wisconsin, USA

Re: Basic syntax error. "Function not allowed within a proce

Post by MrProgrammer »

Radmo wrote:Why was there a decision to report errors like this?
No one here knows. We are users, just like you, not developers. Reporting bugs or suggestions
Radmo wrote:I effectively locked out of my spreadsheet by a procedure that was partially written (still being coded).
Open the options dialog (OpenOffice → Preferences on a Mac, Tools → Options on other platforms). Set OpenOffice → Security → Macro security → Security level → Very High and ensure that your spreadsheet is not in one of the Trusted Sources → Trusted File Locations. When you open your spreadsheet again, the macto is disabled and will not run, however you can still edit it. Change the security level when you have fixed the error.

If this solved your problem please go to your first post use the Edit button and add [Solved] to the start of the title. You can select the green checkmark icon at the same time.

[Tutorial] Ten concepts that every Calc user should know
Mr. Programmer
AOO 4.1.7 Build 9800, MacOS 13.6.3, iMac Intel.   The locale for any menus or Calc formulas in my posts is English (USA).
Post Reply