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 30

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 30

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 30

Assisted Solution

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

Featured Post

Independent Software Vendors: 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

Suggested Solutions

When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
Having trouble getting your hands on Dynamics 365 Field Service or Project Service trial? Worry No More!!!
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

752 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