Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Run a Macro when a data-entry cell is selected

Posted on 2013-06-02
4
Medium Priority
?
301 Views
Last Modified: 2013-08-11
Attached is an example of a data-entry form. Currently, a user form is activated when the button "Show Data-Entry Userform" is clicked. I will like that when a user select a data entry cell (all color coded yellow cells) a macro is run which open a user form with a drop-down-list to select the best entry. For example if cell "I7" is selected a macro is run which open a user form in order to select the best entry from a drop-down-list. Please, I need advice on which is the best way to run the macro when a data-entry cell is selected.

Thanks

Dennis
Copy-of-UserformComboBoxQ2813937.xlsm
0
Comment
Question by:dcantel1
[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
  • 3
4 Comments
 
LVL 31

Accepted Solution

by:
gowflow earned 1500 total points
ID: 39216532
question :
You need the form to be activated only when you hit on I7 ?? or you want that on each and every field you need to fill ? then it will depend on your answer as seems your form only updates the field in I7

gowflow
0
 
LVL 31

Assisted Solution

by:gowflow
gowflow earned 1500 total points
ID: 39216751
Well I was too quick with my previous post. I read again the comments in your workbook and looked at the code and now understand better what you need to acheive. You want the user when positioned on any of the colored (light yellow) cells to have a dropdown opened with the appropriate choices to choose from. You have noted that for item 7 and 11 you will have a special form attached.

What I did is very simple and it is as follows:

1) No need to use the Form you already created.
2) I created in the worksheet Data Names for the ones I immediately attached which you can see are surrounded by border line black in Col A, B, C, F and J
3) if you look at the dropdown in the left top corner cell on sheet data you will see Names created:
Flag
Received
Product
Labeling
Note
Product
Sample

4) these are few that you may expend on.
5) These Names refer to the data that is outlined to which, select say Flag and see what it will highlight, Select Product and you will see it select B2:B21 etc.... you may expand on these when you finish the drawing of your sheet Data.

6) In your sheet Form431 I used the Data Validation to associate these name ranges with the coresponding cell so that when you click on the specific cell you will see an arrow from which you can select the coresponding item.

7) The ones I linked to Name Ranges are the cells that have a darker yellow click on each and see the results.

Note
I could not link more as item 7, 10 and 11 have several sub items and your cells does not exactly refer to same heading items in sheet Data.

LEt me know if this is of any help
gowflow
Copy-of-UserformComboBoxQ2813937.xlsm
0
 
LVL 31

Assisted Solution

by:gowflow
gowflow earned 1500 total points
ID: 39224811
Did you have a chance to try the proposed solution ?
gowflow
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

This article descibes how to create a connection between Excel and SAP and how to move data from Excel to SAP or the other way around.
Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
The viewer will learn how to create a normally distributed random variable in Excel, use a normal distribution to simulate the return on an investment over a period of years, Create a Monte Carlo simulation using a normal random variable, and calcul…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

730 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