Ask Your Question

Run a macro in a particular calc spreadsheet in another machine

asked 2018-12-05 07:37:38 +0200

itsahmedfiroz gravatar image

updated 2018-12-05 11:45:12 +0200

Hi ,

I have a macro that needs to be run only when a certain calc spreadsheet is opened . I know that macro written in My Macros and Dialogues is only available in the machine that i'm using . But i would like to open the spreadsheet in another machine and when opened , the macro should run . So how do we embed a macro for a specific spreadsheet so that it runs when the file is opened in another machine ?

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2018-12-05 20:53:39 +0200

Ratslinger gravatar image

updated 2018-12-05 20:55:07 +0200


You haven't stated, but this is based upon the macro being a Basic macro.

From menu, Tools->Macros->Organise Macros->LibreOffice Basic.... This brings up a dialog.

Select your Calc document then click on New. Give it a name (or accept default) and click OK. This brings up the Basic IDE in the standard library embedded in the document. You can place your code there.

Next, from the document menu, Tools->Customise... on the Events tab select Open Document then press Macro... button. Locate the macro embedded in document you want run when the document is opened. Save all steps. Test.

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower


Asked: 2018-12-05 07:37:38 +0200

Seen: 35 times

Last updated: Dec 05 '18