| View previous topic :: View next topic |
| Author |
Message |
big_cheez OOo Enthusiast

Joined: 28 Mar 2009 Posts: 123
|
Posted: Thu May 21, 2009 9:20 pm Post subject: auto run code for module |
|
|
I have a module with a bunch of subs.
I understand how to delcare global variables outside the subs.
I would like to run some code to set variables for the whole module.
Is there a way to write a sub that will execute once the module is accessed? |
|
| Back to top |
|
 |
probe1 Moderator


Joined: 18 Aug 2004 Posts: 2478 Location: Chonburi Thailand Asia
|
Posted: Thu May 21, 2009 11:19 pm Post subject: |
|
|
There is no automatism. Just call your INIT routine from start of code.
Does this help? _________________ Cheers
Winfried
My Macros
DateTime2 extension: insert date, time or timestamp, formatted to your needs |
|
| Back to top |
|
 |
big_cheez OOo Enthusiast

Joined: 28 Mar 2009 Posts: 123
|
Posted: Fri May 22, 2009 12:39 am Post subject: |
|
|
I already have one macro in another module assigned to open document event.
MS basic allows you to initialize the variable when you declare it.
Is there any equivilent in openoffice? |
|
| Back to top |
|
 |
big_cheez OOo Enthusiast

Joined: 28 Mar 2009 Posts: 123
|
Posted: Sun May 24, 2009 4:43 pm Post subject: |
|
|
| big_cheez wrote: | MS basic allows you to initialize the variable when you declare it.
Is there any equivilent in openoffice? | Anyone? |
|
| Back to top |
|
 |
|