Error message when I open spreadsheet on other computer

I have been working on a Calc spreadsheet with macros at home and emailed it to myself so I can work on it at the office. The spreadsheet opens at the office no problem, but when I press a button on the sheet to run one of the macros, I get the following error message and the macro doesn’t load:

A Scripting Framework error occurred while running the Basic script vnd.sun.star.script:Standard.Module1.start_form?language=Basic&location=application.

Message: The following Basic script could not be found:
library: 'Standard'
module: 'Module1'
method: 'start_form'
location: 'application'

when I open the macro editor, there are no macros in Module1

Pardon my ignorance, I am pretty green with LO Basic…

You most probably have stored your macros not to the file, but to local store, so that it doesn’t get moved with the file.

If you want to run a document with macros on a different PC to the one you created the document on then you should put the macros in a module placed in the document. If you have the macros saved in MyMacros on the PC you created them on they will not be on any other PC. By default macros are saved in the MyMacros.

I am still confused. When I created the macros, I assumed I was working in a macro stored in the document. I didn’t make any choises to store it elsewhere, I just opened the macro editor and edited, then hit the save button when done. So, is there an option somewhere that I need to select to store modules in the document ?

So I have added a new module attached to the spreadsheet and copied the macro code from the module in MyMacros. Now I need to move my two dialogs that also reside in MyMacros to the one attached to the document. How do I move or copy the dialogs ?

Thanks for all the updates, that answers my questions. Ill mark this answered.

Hi

You can move dialogs with ToolsMacrosOrganize Dialogs. Unfold source & target then drag & drop.

For example, in this screenshot I move Dialog1 from Standard to Untitled.ods

image description

Note: add Ctrl if you want to copy

Regards