Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Class Module?

I have a userform that takes the user input, passes it to a worksheet where
the calculations are performed, then presents the results back to the
userform. To do this, I have two Sub Routines placed in a Module. They are
"UpdateCalculationsSheet" & "UpdateUserform".

For each control on the userform, I have placed an "AfterUpdate" Event. In
each "AfterUpdate" routine, I write:

Call UpdateCalculationsSheet
Call UpdateUserform

Instead of doing this for every single control on the userform, is there a
way I can write a SINGLE event for all controls on a userform? I'm not
familiar with class modules. I thought that might be the solution.

Ideally, I just want a Routine that is, Sub Userform_AfterUpdate(), but I
know this doesn't exist.

Thanks!
Steve
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Class Module?

Unfortunately you don't get an AfterUpdate event with application events in
this manner, not even an Exit event

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"steve" wrote in message
...
I have a userform that takes the user input, passes it to a worksheet

where
the calculations are performed, then presents the results back to the
userform. To do this, I have two Sub Routines placed in a Module. They

are
"UpdateCalculationsSheet" & "UpdateUserform".

For each control on the userform, I have placed an "AfterUpdate" Event.

In
each "AfterUpdate" routine, I write:

Call UpdateCalculationsSheet
Call UpdateUserform

Instead of doing this for every single control on the userform, is there a
way I can write a SINGLE event for all controls on a userform? I'm not
familiar with class modules. I thought that might be the solution.

Ideally, I just want a Routine that is, Sub Userform_AfterUpdate(), but

I
know this doesn't exist.

Thanks!
Steve



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default Class Module?

See if this info from J-Walk helps any.
http://j-walk.com/ss/excel/tips/tip44.htm

Charles
steve wrote:
I have a userform that takes the user input, passes it to a worksheet where
the calculations are performed, then presents the results back to the
userform. To do this, I have two Sub Routines placed in a Module. They are
"UpdateCalculationsSheet" & "UpdateUserform".

For each control on the userform, I have placed an "AfterUpdate" Event. In
each "AfterUpdate" routine, I write:

Call UpdateCalculationsSheet
Call UpdateUserform

Instead of doing this for every single control on the userform, is there a
way I can write a SINGLE event for all controls on a userform? I'm not
familiar with class modules. I thought that might be the solution.

Ideally, I just want a Routine that is, Sub Userform_AfterUpdate(), but I
know this doesn't exist.

Thanks!
Steve


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,814
Default Class Module?

so my only option is to place an event for each control?

"Bob Phillips" wrote:

Unfortunately you don't get an AfterUpdate event with application events in
this manner, not even an Exit event

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"steve" wrote in message
...
I have a userform that takes the user input, passes it to a worksheet

where
the calculations are performed, then presents the results back to the
userform. To do this, I have two Sub Routines placed in a Module. They

are
"UpdateCalculationsSheet" & "UpdateUserform".

For each control on the userform, I have placed an "AfterUpdate" Event.

In
each "AfterUpdate" routine, I write:

Call UpdateCalculationsSheet
Call UpdateUserform

Instead of doing this for every single control on the userform, is there a
way I can write a SINGLE event for all controls on a userform? I'm not
familiar with class modules. I thought that might be the solution.

Ideally, I just want a Routine that is, Sub Userform_AfterUpdate(), but

I
know this doesn't exist.

Thanks!
Steve




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Class Module?

Yes, that is the bottom line to the best of my knowledge.

--
Regards,
Tom Ogilvy


"steve" wrote:

so my only option is to place an event for each control?

"Bob Phillips" wrote:

Unfortunately you don't get an AfterUpdate event with application events in
this manner, not even an Exit event

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"steve" wrote in message
...
I have a userform that takes the user input, passes it to a worksheet

where
the calculations are performed, then presents the results back to the
userform. To do this, I have two Sub Routines placed in a Module. They

are
"UpdateCalculationsSheet" & "UpdateUserform".

For each control on the userform, I have placed an "AfterUpdate" Event.

In
each "AfterUpdate" routine, I write:

Call UpdateCalculationsSheet
Call UpdateUserform

Instead of doing this for every single control on the userform, is there a
way I can write a SINGLE event for all controls on a userform? I'm not
familiar with class modules. I thought that might be the solution.

Ideally, I just want a Routine that is, Sub Userform_AfterUpdate(), but

I
know this doesn't exist.

Thanks!
Steve






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Class Module?

That won't work for afterupdate (or exit or beforeupdate or enter)

Only events native to the control - not those provided by the container.

--
Regards,
Tom Ogilvy


"Die_Another_Day" wrote:

See if this info from J-Walk helps any.
http://j-walk.com/ss/excel/tips/tip44.htm

Charles
steve wrote:
I have a userform that takes the user input, passes it to a worksheet where
the calculations are performed, then presents the results back to the
userform. To do this, I have two Sub Routines placed in a Module. They are
"UpdateCalculationsSheet" & "UpdateUserform".

For each control on the userform, I have placed an "AfterUpdate" Event. In
each "AfterUpdate" routine, I write:

Call UpdateCalculationsSheet
Call UpdateUserform

Instead of doing this for every single control on the userform, is there a
way I can write a SINGLE event for all controls on a userform? I'm not
familiar with class modules. I thought that might be the solution.

Ideally, I just want a Routine that is, Sub Userform_AfterUpdate(), but I
know this doesn't exist.

Thanks!
Steve



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
CLASS MODULE & SIMPLE MODULE FARAZ QURESHI Excel Discussion (Misc queries) 1 September 7th 07 09:32 AM
class module? sybmathics Excel Programming 17 February 25th 06 02:29 PM
Class Module Bill Martin[_2_] Excel Programming 6 January 25th 06 08:56 PM
Class module Chip Pearson Excel Programming 0 January 19th 05 03:01 PM
Variable from a sheet module in a class module in XL XP hglamy[_2_] Excel Programming 2 October 14th 03 05:48 PM


All times are GMT +1. The time now is 10:23 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"