ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Event Sequences (https://www.excelbanter.com/excel-programming/291470-event-sequences.html)

Nigel[_6_]

Event Sequences
 
Hi All
Can anyone shed some light on the Excel event sequences or point me in the
right direction ?

What events sequences occur and in what order when userform controls are
clicked, entered, exited etc.

Is there some sample code that perhaps demonstrates the events and the
sequence ?

TIA
Cheers
Nigel





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

Frank Kabel

Event Sequences
 
Hi
have a look at
http://www.cpearson.com/excel/events.htm

--
Regards
Frank Kabel
Frankfurt, Germany

Nigel wrote:
Hi All
Can anyone shed some light on the Excel event sequences or point me
in the
right direction ?

What events sequences occur and in what order when userform controls
are
clicked, entered, exited etc.

Is there some sample code that perhaps demonstrates the events and

the
sequence ?

TIA
Cheers
Nigel





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==---- http://www.newsfeed.com The #1 Newsgroup Service in the
World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized
Servers - Total Privacy via Encryption =---



Bob Phillips[_6_]

Event Sequences
 
Frank's suggestion refers to workbook et al events, whereas you are
specifically referring to userform events.

Each of these events can be individually trapped, but occur when the user
takes that action. So Enter occurs when a textbox is entered for example,
click when a control is clicked, exit when it i is exited (all presuming
appropriate to that control). Obviously, some are order dependent, such as
you have to enter a textbox to add data to it, but that should all be
obvious.

What are you trying to do that needs this info?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Frank Kabel" wrote in message
...
Hi
have a look at
http://www.cpearson.com/excel/events.htm

--
Regards
Frank Kabel
Frankfurt, Germany

Nigel wrote:
Hi All
Can anyone shed some light on the Excel event sequences or point me
in the
right direction ?

What events sequences occur and in what order when userform controls
are
clicked, entered, exited etc.

Is there some sample code that perhaps demonstrates the events and

the
sequence ?

TIA
Cheers
Nigel





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==---- http://www.newsfeed.com The #1 Newsgroup Service in the
World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized
Servers - Total Privacy via Encryption =---





Nigel[_6_]

Event Sequences
 
Thanks Franks, This addresses the workbook events but not the userform
controls. Any other ideas?

Cheers
Nigel


"Frank Kabel" wrote in message
...
Hi
have a look at
http://www.cpearson.com/excel/events.htm

--
Regards
Frank Kabel
Frankfurt, Germany

Nigel wrote:
Hi All
Can anyone shed some light on the Excel event sequences or point me
in the
right direction ?

What events sequences occur and in what order when userform controls
are
clicked, entered, exited etc.

Is there some sample code that perhaps demonstrates the events and

the
sequence ?

TIA
Cheers
Nigel





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==---- http://www.newsfeed.com The #1 Newsgroup Service in the
World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized
Servers - Total Privacy via Encryption =---






----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

Frank Kabel

Event Sequences
 
Hi
sorry didn't read your post carefully enough :-) Unfortunately I do not
have a list for these event sequence (though most of them are quite
obvious). But you can try the following:
- Create a userform
- for each event of your interest create code which just invokes a
messagebox with the respective event name
I know- not elegant, but working :-)



--
Regards
Frank Kabel
Frankfurt, Germany

Nigel wrote:
Thanks Franks, This addresses the workbook events but not the

userform
controls. Any other ideas?

Cheers
Nigel


"Frank Kabel" wrote in message
...
Hi
have a look at
http://www.cpearson.com/excel/events.htm

--
Regards
Frank Kabel
Frankfurt, Germany

Nigel wrote:
Hi All
Can anyone shed some light on the Excel event sequences or point me
in the
right direction ?

What events sequences occur and in what order when userform

controls
are
clicked, entered, exited etc.

Is there some sample code that perhaps demonstrates the events and

the
sequence ?

TIA
Cheers
Nigel





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==---- http://www.newsfeed.com The #1 Newsgroup Service in the
World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized
Servers - Total Privacy via Encryption =---






----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==---- http://www.newsfeed.com The #1 Newsgroup Service in the
World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized
Servers - Total Privacy via Encryption =---



Nigel[_6_]

Event Sequences
 
Bob,
More for my own understanding than a specific application. I am aware of
the events that result from the user interacting with a userform, and in
some cases will trigger a sequence of events. For example is it true that
say entering a textbox by clicking on it, triggers both the 'enter' event
and a 'click' event, if so in what order do they occur?

If my code acted on the first event, would the 2nd or 3rd etc., be actioned?

I had a mind some form of table that shows for each control the individual
actions and resulting sequence of event(s).

Cheers
Nigel

"Bob Phillips" wrote in message
...
Frank's suggestion refers to workbook et al events, whereas you are
specifically referring to userform events.

Each of these events can be individually trapped, but occur when the user
takes that action. So Enter occurs when a textbox is entered for example,
click when a control is clicked, exit when it i is exited (all presuming
appropriate to that control). Obviously, some are order dependent, such as
you have to enter a textbox to add data to it, but that should all be
obvious.

What are you trying to do that needs this info?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Frank Kabel" wrote in message
...
Hi
have a look at
http://www.cpearson.com/excel/events.htm

--
Regards
Frank Kabel
Frankfurt, Germany

Nigel wrote:
Hi All
Can anyone shed some light on the Excel event sequences or point me
in the
right direction ?

What events sequences occur and in what order when userform controls
are
clicked, entered, exited etc.

Is there some sample code that perhaps demonstrates the events and

the
sequence ?

TIA
Cheers
Nigel





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==---- http://www.newsfeed.com The #1 Newsgroup Service in the
World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized
Servers - Total Privacy via Encryption =---








----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =---

Bob Phillips[_6_]

Event Sequences
 
Nigel,

In your example, it would struggle to trigger the click event as there is no
click event for a textbox.

You may find this technique that I use as helpful to control events. A major
problem is that sometimes one event can fire another, as you state, so it is
sometimes better to stop the events triggering. I set a variable to control
this like so

Dim fEvents As Boolean

Private Sub cmdDo_Click()

if FEevents = False Then
fEvents = True
'o whatever
fEvents = False
End If

End Sub

Beacuase this sets the flag on entry, if itis re-entered within this event,
it will simple exit as the flag is alraedy set. Just before exit it resets
the flag.

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Nigel" wrote in message
...
Bob,
More for my own understanding than a specific application. I am aware of
the events that result from the user interacting with a userform, and in
some cases will trigger a sequence of events. For example is it true that
say entering a textbox by clicking on it, triggers both the 'enter' event
and a 'click' event, if so in what order do they occur?

If my code acted on the first event, would the 2nd or 3rd etc., be

actioned?

I had a mind some form of table that shows for each control the individual
actions and resulting sequence of event(s).

Cheers
Nigel

"Bob Phillips" wrote in message
...
Frank's suggestion refers to workbook et al events, whereas you are
specifically referring to userform events.

Each of these events can be individually trapped, but occur when the

user
takes that action. So Enter occurs when a textbox is entered for

example,
click when a control is clicked, exit when it i is exited (all presuming
appropriate to that control). Obviously, some are order dependent, such

as
you have to enter a textbox to add data to it, but that should all be
obvious.

What are you trying to do that needs this info?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Frank Kabel" wrote in message
...
Hi
have a look at
http://www.cpearson.com/excel/events.htm

--
Regards
Frank Kabel
Frankfurt, Germany

Nigel wrote:
Hi All
Can anyone shed some light on the Excel event sequences or point me
in the
right direction ?

What events sequences occur and in what order when userform controls
are
clicked, entered, exited etc.

Is there some sample code that perhaps demonstrates the events and
the
sequence ?

TIA
Cheers
Nigel





----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet
News==---- http://www.newsfeed.com The #1 Newsgroup Service in the
World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized
Servers - Total Privacy via Encryption =---







----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet

News==----
http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000

Newsgroups
---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption

=---




All times are GMT +1. The time now is 04:30 AM.

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