two functions into one?

1jet

Registered User.
Local time
Today, 22:46
Joined
Sep 15, 2008
Messages
117
Hello again all,

First of all I think I should thank everyone on this forum for what I've learnt thus far.

This time I'm going to put together two functions.

=vbaPasswordCheck() and =vbaAppendData have been created as two separate event triggered functions.

I'd now like to know how I can refer to =vbaAppendData using such code from within =vbaPasswordCheck.
(I'm thinking I've seen the terminology sub function around and it's related).

If I did this, would =vbaAppendData finish then GO BACK into =vbaPasswordCheck from which it was launched?

Thanks!
 
If I did this, would =vbaAppendData finish then GO BACK into =vbaPasswordCheck from which it was launched?

Yes; code would pass from the first function to the second, then return and run the next line in the first after finishing the second.
 
Alright, so how do I code for this to happen?
 
From within the first one simply call the second:

vbaAppendData
 
Hahaha...
If you can at least give me a small clue such as the calling command I can search the forum for more useful information?
 
that's it. just type the name of the function. and it's called. there can be some variation if you're passing parameters, otherwise, that's it.

(oh, hi paul i thought you were gone.)
 
No problemo, wazz.

1jet, you can also call it with the Call statement in VBA, but it's not necessary. As wazz said, just type the name of the function. If you use Call, parentheses are required, otherwise not (more info in VBA help on Call).
 
Gees, you guys weren't kidding.
Yeah I've just put in the name of the function and it worked!
Cheers fellas
 
it's a function. like Date or Now. just type it in. very nice.

(ignore what i said about parameters, i meant there's some variation when using Call, as paul said).
 

Users who are viewing this thread

Back
Top Bottom