Ask Your Question

How do I distribute my Calc application (with macros and dialogs) with them attached

asked 2021-01-09 16:22:45 +0100

Batbloke gravatar image

updated 2021-01-12 12:35:50 +0100

When I send the spreadsheet doc., all that arrives are the sheets. No macro, no dialogs. I've tried putting everything in another library I created, but that doesn't work. Surely there must be a simple solution to this.

Thanks for your answer. Yes, I did send it as .ods. I did, in ignorance, send it with the macros and dialogs as My Macros (so only the spreadsheet was sent, it seems - not the macros or dialogs).

I have now put all my macros and dialogs within Work.ods>Standard>Module1. To do this, within Basic Macro Organiser, I dragged MyMacros>Standard>Module 1 into Work.ods>Standard, I then dragged the dialogs down. When I run it I get error "Type:" - this is being thrown by Tools Function LoadDialog(Libname as String, DialogName as String, Optional oLibContainer) where libname is Standard, but I'm assuming oLibContainer is MyMacros rather than Work.ods. Confused.

P.S. I went into safe mode and reset my user settings


HELP PLEASE! This is still outstanding (12 Jan 21)

edit retag flag offensive close merge delete


Regarding your "Answer"

Considering the distribution of such work is surely commonplace, documentation, general awareness and even search results seem to be thin on the ground.

May be - but documentation couldn't cover any macro / user profile mess produced by whatever/whomever.

I don't know what else I can do.

Fix your user profile first; restore your macros ("My Macros" are stored in your LibreOffice user profile, so be careful) and move 'em into your documents.

Opaque gravatar imageOpaque ( 2021-01-09 18:12:50 +0100 )edit

HELP PLEASE! This is still outstanding (12 Jan 21)

The answer to your question has been given. If you can't repair your corrupted installation, please ask a new question with all details or engage professional support. If you have reset your user profile to factory settings without a backup of your personal macros, nobody could help.

Opaque gravatar imageOpaque ( 2021-01-12 12:43:29 +0100 )edit

2 Answers

Sort by » oldest newest most voted

answered 2021-01-09 17:46:37 +0100

Batbloke gravatar image

updated 2021-01-09 18:34:54 +0100

Thanks for your answer. I am sending them as .ods (they wouldn't work in Excel anyway). I did, in ignorance, send them with the macros and dialogs in 1/ My Macros. However I did try transplanting them into another library but the program threw an exception stating it couldn't find the module (it was still looking in the Standard library of My Macros). I tried again, then LibreOffice went into meltdown , deleted modules and hung. I had to de-install and reinstall and carefully put all my work back into My Macros before I could get it back working again (minus the stuff I neglected to back up - duh).

edit flag offensive delete link more


Do not answer your own question unless it is a real answer. Modify or comment the original question.

gabix gravatar imagegabix ( 2021-01-09 17:47:44 +0100 )edit

answered 2021-01-09 17:08:29 +0100

Opaque gravatar image

updated 2021-01-09 18:17:20 +0100


File Format

You did not mention the file format you are saving your Calc sheets to. But if you don't save 'em to .ods/.fods macros get removed since they are pointless in .xls/xlsx (LibreOffice Basic macros won't work on Excel and hence are not stored on saving to Excel file format).

(I'd assume this being the cause of your issue, since you wrote you already moved libraries to different categories - see next section).

Incorrect Scope

There are 3 categories, where macros could be save:

  1. Global (available for all users/instances of Libreoffice on a system = LibreOffice Macros)
  2. User (available to a specific user only = My Macros)
  3. Document (available only if a document is open - Current Document Name)

See: Tools -> Macros -> Organize Macros -> Basic...

image description

If there are no macros, when you deliver/send your file to another system or user, then you added your macros to category 2. ( or - but unlikely - to 1.) from above, but not into 3., which would be the appropriate place, if you want to deliver your macros in conjunction with a specific sheet.

Hope that helps.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2021-01-09 16:22:45 +0100

Seen: 31 times

Last updated: Jan 12