Run a Macro when a data-entry cell is selected

Posted on 2013-06-02
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.


Question by:dcantel1
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
LVL 31

Accepted Solution

gowflow earned 500 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

LVL 31

Assisted Solution

gowflow earned 500 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:

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.

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
LVL 31

Assisted Solution

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

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

As with any other System Center product, the installation for the Authoring Tool can be quite a pain sometimes. This article serves to help you avoid making these mistakes and hopefully save you a ton of time on troubleshooting :)  Step 1: Make sur…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
If you’ve ever visited a web page and noticed a cool font that you really liked the look of, but couldn’t figure out which font it was so that you could use it for your own work, then this video is for you! In this Micro Tutorial, you'll learn yo…

615 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