Call statements
- From: "Pop`" <nodoby@xxxxxxxxxxxxxxxxxxx>
- Date: Mon, 15 Oct 2007 15:58:53 GMT
Hi,
What is the "danger" in calling command buttons or setting their state =
true in VB6 code?
I have a fair amount of repetitive code, sometimes exactly what a command
button does and so far I've been creating separate subs to hold such code.
e.g. if I have a cmdDoIt_click() I'll create a 'Private Sub DoIt' and dump
the code into that for reuse instead of calling the button.
Instead of duplicating in a few instances, just for grins to see what
happens, I've been Call-ing command buttons or setting them to True. So far
nothing untoward has happened, but, though I do NOT Plan to leave that
there, I did the test because I've received some pretty strong advice to NOT
call buttons or set them to True; instead, create a separate sub for the
code. But there wasn't any reasoning behind the advice, that I can find now,
at least.
Since nothing untoward has happened, then there must be some other,
possibly non-techical reason for not doing that. I'm hoping someone can
give me the reasoning behind it. It's a "head-around" thing<g>.
TIA,
Pop`
.
- Follow-Ups:
- Thank you Re: Call statements
- From: Pop`
- Re: Call statements
- From: Ralph
- Re: Call statements
- From: Saga
- Re: Call statements
- From: Rick Rothstein \(MVP - VB\)
- Thank you Re: Call statements
- Prev by Date: Re: Frx split - Disappeared?
- Next by Date: Re: VB 6 Requirement
- Previous by thread: Re: Frx split - Disappeared?
- Next by thread: Re: Call statements
- Index(es):