ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   calling subs, Doesn't seem to run fisrt time? (https://www.excelbanter.com/excel-programming/293837-calling-subs-doesnt-seem-run-fisrt-time.html)

CAA[_21_]

calling subs, Doesn't seem to run fisrt time?
 
I have a userform with quite a few subs, i tend to just call them su
whatever()

When i call subs from other subs things are fine.
Now i've come across soemthing strange, i call a few subs from
text_enter event and one of the subs called from within one of thos
subs doesn't run first time round, but does work!?

I tried integrating the sub within the first sub but again it doesn'
run first time round.

I'm settiing the Tag property of labels depending on their location t
other labels, iv'e been through the code several times and can'
understand why this wouldn't work? although the code does but not th
first time it is called. I've shifted it up the list of called subs a
far as i can but it doesn't help.

Is there a limit to how many subs you can call from an event?
Is there a limit to how many subs from subs you can call?
& is there a better way to call a collection of subs?

Thanks for looking & i hope it hasn't frustrated you as much as it ha
me
CA

--
Message posted from http://www.ExcelForum.com


kkknie[_2_]

calling subs, Doesn't seem to run fisrt time?
 
Is there a limit to how many subs you can call from an event?
- Not that I know of...

Is there a limit to how many subs from subs you can call?
- See above.

Is there a better way to call a collection of subs?
- Probably, but your way seems fine to me.

First check to be sure that the sub is actually not running buy puttin
something like Msgbox "I'm Running" at the beginning of the code. M
guess is that it is running, but not doing what you want for some othe
reason.

Post back with your findings.



--
Message posted from http://www.ExcelForum.com


CAA[_22_]

calling subs, Doesn't seem to run fisrt time?
 
It does run, i put a msgbox at the end and it runs 2 times, but doesn'
update my tag property.
If i run it one more time by updating a different textbox, with EXACTL
the same call subs sequence it does what it's meant to.

More head scratching is needed, can't suss why it runs twice though? I
has to be something i've done then, i'm glad there seems to be no limi
to calling subs.

Thanks for the help

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 09:02 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com