FAQ

Häufig gestellte Fragen zur Selbsthilfe.

Bitte werfen Sie einen kurzen Blick auf häufig gestellte Fragen (und Antworten) in der Standardliste. Wenn Sie nicht finden, wonach Sie suchen, beginnen Sie mit der Auswahl Ihrer Ability Office -Version und grenzen Sie sie dann ein, indem Sie den Suchtext und/oder die Kategorie eingeben.

Wissensdatenbankartikel 101

Run macros from Hyperlinks

A neat way to provide the "glue" that links documents to macro code, macros can be run using the hyperlink function.

Example using Spreadsheet

  1. Create simple macro - select Tools/Macro/Macros
  2. In the Macro name box, type TestMacro and click Create
  3. Below the line "Sub TestMacro", enter:
    MsgBox "Hello"
  4. Use the Windows menu to return to the spreadsheet
  5. In a spare cell, type:
    =Hyperlink("#TestMacro", "Click here")

NB: You don't have to put in Click here - any description will do.

Now you can click the hyperlink "Click Here" to run the macro - a simple message box will appear.

The hash symbol (#) above is used to denote a macro (as opposed to a normal URL). The macro in this case is an Application level macro and is available for any Spreadsheet. It's also possible to run a macro in a document. In this case, the syntax is:

=HYPERLINK("documentname#macroname", "Click here")

For example, a user called Phil, with a macro called "startit" in a spreadsheet called myspread stored in my documents would enter:

=HYPERLINK("C:\Documents and Settings\Phil\My Documents\myspread.aws#startit", "Click here")

The HYPERLINK function can be used in a similar way in Write (use Insert/Hyperlink) and Database (create a calculated field to hold the function - see Knowledge Base Article 82: Creating a database of hyperlinks for an example).