call VBA compiled code within vba

L

Les

Hi There,

How do I call an vba application code within vba code. I
have two application which is saving excel file and the
other one is doing some manipulation of data, but I want
to call the other application within the main vba code.
How could I do that?

Appreciate your help.

TIA
Les
 
P

Peter Atherton

Les
You just type the name of the macro to be called within
the main macro.
e.g.

Sub Main()
Dim i, j 'and other declarations

'youre code

'Call the macro
mySave 'the code switches to the next macro
End sub

Sub mySave()
FileSave()
'this code is run and after End sub completes the Main
Macro
End Sub

Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top