# Cannot create a new macro

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Calc Macro IDE does not present any options for adding a new macro. And Calc document copied to a target computer does not contain the macro written on the source computer.

Macro security is set to Low Security Level, and path is part of trusted sources.

What needs to be changed to enable the macro from the source computer?

Windows 10, LibreOffice 5.3.0.3.

edit retag close merge delete

Sort by » oldest newest most voted

Chapter 12 - Calc Macros (found on this page) shows the structure of the macro library and how to insert yours. If the macro on the source computer was not attached in the actual document (more likely in My Macros) it is not transferred between computers. This would need to be done manually. A copy/paste into a text file would suffice.

more

As an engineer and C++ programmer, this document has put me in the candy store. I think it is too bad that the documentation for LibreOffice is a little hard to find, except by consulting experts like you. Thank you so much for the document. It is remarkable in depth, illustration, and completeness. This manual removes my last fear of forgetting the yearly Microsoft tax!

( 2017-09-01 02:41:38 +0100 )edit

Don't stop there. Docs are not as hard to find as you may think. Pitonyak has a site with more - google it. Don't leave out OpenOffice docs - most is still reference for LO - see this page.

( 2017-09-01 03:06:19 +0100 )edit

Now I'm both impressed and overwhelmed. Looking at this page gave me hope and further interest. Thanks soo much of leading me to these resources! BTW the Pitonyak bible helped me solve the problem of formatting a date: Dim d As date . . . d = cdate(join(s(),":")) Cell.formulaLocal = d

( 2017-09-01 04:15:45 +0100 )edit

This post is a wiki. Anyone with karma >75 is welcome to improve it.

Create a Library in My Macros. Save in it the macro. Export the library. Import the Library in the remote computer in user's My Macros. Be warned that may have conflicting names in macro or Library.

more

Your question is a bit confusing as you say

Calc Macro IDE does not present any options for adding a new macro.

yet you then say

Calc document copied to a target computer does not contain the macro written on the source computer.

So you must have written a Macro. As @Ratslinger said if you saved the Macro on your source computer in My Macros it will not be available on the target computer. It is best to save the Macros in a Library in the Calc document if you want to use the Calc document on a different computer to the source computer. The Macros are then stored within the Calc document and will be available on any computer the document is transferred to.

more

Thank you Ratslinger and peterwt for your answers. Both drew me to study the manual linked from Ratslinger's response. Most of all, I agree with the manual author's conclusion "Each topic deserves at least one chapter..."

Using your instructions I was able to successfully save the workbook with the macro saved in a new library, and link it to the event that triggers the procedure.

For version 5 of Calc, I want to document what I learned. The navigation is a little tricky for me as a beginner without context, but the relationships shown in the linked drawing could easily be a whole chapter in the manual.

Thank you again. Bob

more

@koshari For a more detailed look at macro storage, see Chapter 2 of book Open Office Macros Explained (OOME) by Andrew Pitonyak - PDF here.

( 2017-08-30 18:06:27 +0100 )edit

## Stats

Seen: 128 times

Last updated: Oct 29 '17