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

Nested macros

 
Post new topic   Reply to topic    OOoForum.org Forum Index -> OpenOffice.org Calc
View previous topic :: View next topic  
Author Message
kinpatsu
Newbie
Newbie


Joined: 24 Nov 2008
Posts: 2

PostPosted: Mon Nov 24, 2008 11:40 am    Post subject: Nested macros Reply with quote

I have created a macro in Calc - let's call it Macro1.

I now want to create a second macro - call it Macro2 - that simply entails running Macro1 10 times in a row.

I never had a problem doing this in Excel 97, but it does not seem to work in Calc. Is there a way to do this?
Back to top
View user's profile Send private message
Mark B
Super User
Super User


Joined: 16 Feb 2007
Posts: 852
Location: Lincolnshire, UK

PostPosted: Mon Nov 24, 2008 11:58 am    Post subject: Reply with quote

Hi

There shouldn't be any difference in the two - this will work in both:
Code:

Sub Macro1
'Do some work
End Sub

Sub Macro2
For i=1 to 10
 Macro1
Next i
End Sub


Mark
_________________
Mark B's Articles
Back to top
View user's profile Send private message Send e-mail Visit poster's website MSN Messenger
kinpatsu
Newbie
Newbie


Joined: 24 Nov 2008
Posts: 2

PostPosted: Mon Nov 24, 2008 12:13 pm    Post subject: Thank you Reply with quote

Beautiful! I've been mostly a WYSIWYG macro creator - I use the "record macro" tool and then trust the program to faithfully reproduce the sequence of mouse/keyboard commands I enter - but this makes me think that I should invest a bit of time in learning some simple programming principles. Thank you!
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 Calc 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