Solved

VBA Classes to use

Posted on 2012-04-12
12
211 Views
Last Modified: 2012-04-14
Hi Dave,

With reference to a previous question, I want to know how to do an event or change based on a change to ANY control, without having to create a function/subroutine STUB for each control as we have done in this workbook.  As you indicated - "When you're ready, ask that question as there are classes that can be developed that check for clicks all in one set of code."
Creating on-click codes for al types of buttons really adds up necessarily code lines.

Thank You
R
0
Comment
Question by:Rayne
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 3
  • 2
12 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 37841430
What previous question did you intend to reference?
0
 
LVL 40

Expert Comment

by:als315
ID: 37841497
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:Rayne
ID: 37843331
I ended up using codes for individual controls like buttons. But there could be a single event handling class  in vba that would take care of all user inputs  as Demille indicated in the previous solution..
0
 

Author Comment

by:Rayne
ID: 37845242
Any ideas?
0
 
LVL 40

Expert Comment

by:als315
ID: 37845632
Did you try my example? You can insert your controls into Group box and have one event for all controls inside this box
0
 

Author Comment

by:Rayne
ID: 37845662
Hello Als315,

Can you demonstrate that in this file? I see you insert _grp module but can you show how you include different controls types into that? Just an example..
0
 
LVL 40

Accepted Solution

by:
als315 earned 400 total points
ID: 37845860
Strange answer was accepted :)
You can create group control and place your controls inside this group. Then you will be able to use one event for all controls inside this group.
0
 

Author Comment

by:Rayne
ID: 37845884
Damn...I am sorry..I think I hit the wrong button...but anyways thanks to both Sir Graham and you :)
0
 
LVL 76

Assisted Solution

by:GrahamSkan
GrahamSkan earned 100 total points
ID: 37846420
You can use the 'Request Attention' link to ask that the question be re-opened so that youcan re-assign the points.
0
 

Author Comment

by:Rayne
ID: 37846780
Sure I will do that
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
I was prompted to write this article after the recent World-Wide Ransomware outbreak. For years now, System Administrators around the world have used the excuse of "Waiting a Bit" before applying Security Patch Updates. This type of reasoning to me …
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question