OpenOffice.org Forum at OOoForum.orgThe OpenOffice.org Forum
 
 [Home]   [FAQ]   [Search]   [Memberlist]   [Usergroups]   [Register
 [Profile]   [Log in to check your private messages]   [Log in

auto run code for module

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API
View previous topic :: View next topic  
Author Message
big_cheez
OOo Enthusiast
OOo Enthusiast


Joined: 28 Mar 2009
Posts: 123

PostPosted: Thu May 21, 2009 9:20 pm    Post subject: auto run code for module Reply with quote

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
View user's profile Send private message
probe1
Moderator
Moderator


Joined: 18 Aug 2004
Posts: 2560
Location: Chonburi Thailand Asia

PostPosted: Thu May 21, 2009 11:19 pm    Post subject: Reply with quote

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
View user's profile Send private message Visit poster's website
big_cheez
OOo Enthusiast
OOo Enthusiast


Joined: 28 Mar 2009
Posts: 123

PostPosted: Fri May 22, 2009 12:39 am    Post subject: Reply with quote

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
View user's profile Send private message
big_cheez
OOo Enthusiast
OOo Enthusiast


Joined: 28 Mar 2009
Posts: 123

PostPosted: Sun May 24, 2009 4:43 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Macros and API All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group