how to write 'goto nloop' which is inside higher level sub, when my condition is true in sub_2 and I do not wanna run sub_3 ?
Please Login or Register to view this content.
how to write 'goto nloop' which is inside higher level sub, when my condition is true in sub_2 and I do not wanna run sub_3 ?
Please Login or Register to view this content.
You can't do this. You will need to use a public variable and a conditional statement of some kind like so:
(also no need to use the "Call" keyword, it's legacy code and not required anymore in VBA.)Please Login or Register to view this content.
You could have Sub2 call Sub3 if not True
Please Login or Register to view this content.
Last edited by Leith Ross; 10-12-2015 at 03:48 PM. Reason: Added Code Tags
Surround your VBA code with CODE tags e.g.;
[CODE]your VBA code here[/CODE]
The # button in the forum editor will apply CODE tags around your selected text.
thanks but I have 1 main macro and about 10 macros which are inside.
Please Login or Register to view this content.
I need to add instructions in all these 10 macros to start my main macro from the begining when condition is true.Please Login or Register to view this content.
Last edited by zico8; 10-12-2015 at 08:53 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks