Call a VBA module
Solved
dubolg
-
dubol -
dubol -
Hello,
Small programming issue.
I wrote a code in a module (Sub ex1 () )
I want to call the "Sub ex1" in another module (Sub_principal) and have it execute only once
Can you help me? Thank you
Have a nice day
Small programming issue.
I wrote a code in a module (Sub ex1 () )
I want to call the "Sub ex1" in another module (Sub_principal) and have it execute only once
Can you help me? Thank you
Have a nice day
8 answers
Hello,
you just need to write ex1 or Call ex1 in the main routine.
Example:
Best regards.
--
This guy wasn't the brightest, as he was naive.
you just need to write ex1 or Call ex1 in the main routine.
Example:
Sub Sub_principal() ... Call ex1 ... End Sub
Best regards.
--
This guy wasn't the brightest, as he was naive.
Good evening;
Would you happen to have a module name called "ex1", by any chance?
You can't name a Sub and a Module the same name....
Have a good evening.
Would you happen to have a module name called "ex1", by any chance?
You can't name a Sub and a Module the same name....
Have a good evening.
Hello,
To present my problem that is still not resolved.
In Microsoft Visual Basic under Excel,
I created 3 macros (starting with Sub... and ending with End Sub) in the module folder. In this same folder, I created a 4th one that I will call main, in which I would like to call the 3 macros (to execute them).
Thank you for your help.
To present my problem that is still not resolved.
In Microsoft Visual Basic under Excel,
I created 3 macros (starting with Sub... and ending with End Sub) in the module folder. In this same folder, I created a 4th one that I will call main, in which I would like to call the 3 macros (to execute them).
Thank you for your help.
In fact, I have in the module properties (name) named the same name as the one in the module at the Sub level...
Since I changed to different names, I can now call my procedures.
Since I changed to different names, I can now call my procedures.
I already tried, the other problem is that it tells me "variable or procedure expected, not module".